mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Minor improvements
cellFsAioRead partially implemented, cellPadInfoPressMode & cellPadInfoSensorMode stubs
This commit is contained in:
parent
64b18b4dc2
commit
5f06f46f32
10 changed files with 106 additions and 42 deletions
|
@ -48,8 +48,8 @@ int cellSyncMutexLock(mem32_t mutex)
|
|||
{
|
||||
return CELL_SYNC_ERROR_ALIGN;
|
||||
}
|
||||
//aggressive spin-wait
|
||||
while (_InterlockedExchange((volatile long*)(Memory + mutex_addr), 1));
|
||||
while (_InterlockedExchange((volatile long*)Memory.VirtualToRealAddr(mutex_addr), 1 << 24));
|
||||
//need to check how does SPU work with these mutexes, also obtainment order is not guaranteed
|
||||
_mm_lfence();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -65,7 +65,8 @@ int cellSyncMutexTryLock(mem32_t mutex)
|
|||
{
|
||||
return CELL_SYNC_ERROR_ALIGN;
|
||||
}
|
||||
if (_InterlockedExchange((volatile long*)(Memory + mutex_addr), 1))
|
||||
//check cellSyncMutexLock
|
||||
if (_InterlockedExchange((volatile long*)Memory.VirtualToRealAddr(mutex_addr), 1 << 24))
|
||||
{
|
||||
return CELL_SYNC_ERROR_BUSY;
|
||||
}
|
||||
|
@ -84,8 +85,9 @@ int cellSyncMutexUnlock(mem32_t mutex)
|
|||
{
|
||||
return CELL_SYNC_ERROR_ALIGN;
|
||||
}
|
||||
//check cellSyncMutexLock
|
||||
_mm_sfence();
|
||||
mutex = 0;
|
||||
_InterlockedExchange((volatile long*)Memory.VirtualToRealAddr(mutex_addr), 0);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue