| 235 | } |
| 236 | |
| 237 | void 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 | |
| 253 | error_code sys_interrupt_thread_disestablish(ppu_thread& ppu, u32 ih) |
| 254 | { |
nothing calls this directly
no test coverage detected