MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / sys_ppu_thread_once

Function sys_ppu_thread_once

ps3fw/sys_ppu_thread_.cpp:237–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237void sys_ppu_thread_once(ppu_thread& ppu, vm::ptr<s32> once_ctrl, vm::ptr<void()> init)
238{
239 sysPrxForUser.notice("sys_ppu_thread_once(once_ctrl=*0x%x, init=*0x%x)", once_ctrl, init);
240
241 ensure(sys_mutex_lock(ppu, *g_ppu_once_mutex, 0) == CELL_OK);
242
243 if (*once_ctrl == SYS_PPU_THREAD_ONCE_INIT)
244 {
245 // Call init function using current thread context
246 init(ppu);
247 *once_ctrl = SYS_PPU_THREAD_DONE_INIT;
248 }
249
250 ensure(sys_mutex_unlock(ppu, *g_ppu_once_mutex) == CELL_OK);
251}
252
253error_code sys_interrupt_thread_disestablish(ppu_thread& ppu, u32 ih)
254{

Callers

nothing calls this directly

Calls 4

sys_mutex_lockFunction · 0.85
sys_mutex_unlockFunction · 0.85
ensureFunction · 0.50
initFunction · 0.50

Tested by

no test coverage detected