From b61bcb6ad657f974bdb3d8fc18b89744dd250a40 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 2 Jan 2015 14:53:55 +0300 Subject: [PATCH] Compilation fix --- rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp b/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp index e93252b531..bf89dc723d 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp @@ -49,7 +49,7 @@ s32 sys_rwlock_destroy(u32 rw_lock_id) return CELL_ESRCH; } - if (!rw->sync.compare_and_swap_test({ 0, 0 }, { -1, -1 })) // check if locked and make unusable + if (!rw->sync.compare_and_swap_test({ 0, 0 }, { ~0, ~0 })) // check if locked and make unusable { return CELL_EBUSY; } @@ -76,7 +76,7 @@ s32 sys_rwlock_rlock(u32 rw_lock_id, u64 timeout) rw->sync.atomic_op_sync([&succeeded](RWLock::sync_var_t& sync) { assert(~sync.readers); - if (succeeded = !sync.writer) + if ((succeeded = !sync.writer)) { sync.readers++; } @@ -118,7 +118,7 @@ s32 sys_rwlock_tryrlock(u32 rw_lock_id) rw->sync.atomic_op_sync([&succeeded](RWLock::sync_var_t& sync) { assert(~sync.readers); - if (succeeded = !sync.writer) + if ((succeeded = !sync.writer)) { sync.readers++; } @@ -145,7 +145,7 @@ s32 sys_rwlock_runlock(u32 rw_lock_id) bool succeeded; rw->sync.atomic_op_sync([&succeeded](RWLock::sync_var_t& sync) { - if (succeeded = sync.readers != 0) + if ((succeeded = sync.readers != 0)) { assert(!sync.writer); sync.readers--;