mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard Change semaphore<> interface to Lockable (+ exotic try_unlock method)
This commit is contained in:
parent
5e556a87ff
commit
ca5158a03e
50 changed files with 283 additions and 382 deletions
|
@ -1550,7 +1550,7 @@ extern void ppu_initialize(const ppu_module& info)
|
|||
continue;
|
||||
}
|
||||
|
||||
semaphore_lock lock(jmutex);
|
||||
std::lock_guard lock(jmutex);
|
||||
jit->add(cache_path + obj_name);
|
||||
|
||||
LOG_SUCCESS(PPU, "LLVM: Loaded module %s", obj_name);
|
||||
|
@ -1568,7 +1568,7 @@ extern void ppu_initialize(const ppu_module& info)
|
|||
|
||||
// Allocate "core"
|
||||
{
|
||||
semaphore_lock jlock(jcores->sem);
|
||||
std::lock_guard jlock(jcores->sem);
|
||||
|
||||
if (!Emu.IsStopped())
|
||||
{
|
||||
|
@ -1586,7 +1586,7 @@ extern void ppu_initialize(const ppu_module& info)
|
|||
}
|
||||
|
||||
// Proceed with original JIT instance
|
||||
semaphore_lock lock(jmutex);
|
||||
std::lock_guard lock(jmutex);
|
||||
jit->add(cache_path + obj_name);
|
||||
});
|
||||
}
|
||||
|
@ -1605,7 +1605,7 @@ extern void ppu_initialize(const ppu_module& info)
|
|||
// Jit can be null if the loop doesn't ever enter.
|
||||
if (jit && jit_mod.vars.empty())
|
||||
{
|
||||
semaphore_lock lock(jmutex);
|
||||
std::lock_guard lock(jmutex);
|
||||
jit->fin();
|
||||
|
||||
// Get and install function addresses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue