mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +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
|
@ -1004,7 +1004,7 @@ DECLARE(lv2_obj::g_waiting);
|
|||
|
||||
void lv2_obj::sleep_timeout(named_thread& thread, u64 timeout)
|
||||
{
|
||||
semaphore_lock lock(g_mutex);
|
||||
std::lock_guard lock(g_mutex);
|
||||
|
||||
const u64 start_time = get_system_time();
|
||||
|
||||
|
@ -1058,7 +1058,7 @@ void lv2_obj::awake(cpu_thread& cpu, u32 prio)
|
|||
// Check thread type
|
||||
if (cpu.id_type() != 1) return;
|
||||
|
||||
semaphore_lock lock(g_mutex);
|
||||
std::lock_guard lock(g_mutex);
|
||||
|
||||
if (prio == -4)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue