vm::atomic update, be_t update

1) MakeFromLE replaced with make(), MakeFromBE removed. Compiler seems
to be able to optimize it anyway.
2) be_t<> conversion operator temporarily replaced with conversion
through LE because it can't work with all possible numeric conversions
(float<>int for example)
This commit is contained in:
Nekotekina 2014-09-20 03:16:11 +04:00
parent 0baf295c1b
commit 66000240ac
16 changed files with 98 additions and 89 deletions

View file

@ -16,7 +16,7 @@ u32 libsre;
u32 libsre_rtoc;
#endif
s32 syncMutexInitialize(vm::ptr<CellSyncMutex> mutex)
s32 syncMutexInitialize(vm::ptr<vm::atomic<CellSyncMutex>> mutex)
{
if (!mutex)
{
@ -28,12 +28,11 @@ s32 syncMutexInitialize(vm::ptr<CellSyncMutex> mutex)
}
// prx: set zero and sync
mutex->m_data() = 0;
InterlockedCompareExchange(&mutex->m_data(), 0, 0);
mutex->exchange({});
return CELL_OK;
}
s32 cellSyncMutexInitialize(vm::ptr<CellSyncMutex> mutex)
s32 cellSyncMutexInitialize(vm::ptr<vm::atomic<CellSyncMutex>> mutex)
{
cellSync->Log("cellSyncMutexInitialize(mutex_addr=0x%x)", mutex.addr());