Minor improvements

cellFsAioRead partially implemented, cellPadInfoPressMode &
cellPadInfoSensorMode stubs
This commit is contained in:
Nekotekina 2014-01-05 03:58:03 +04:00
parent 64b18b4dc2
commit 5f06f46f32
10 changed files with 106 additions and 42 deletions

View file

@ -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;
}