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

Function sys_ppu_thread_exit

ps3fw/sys_ppu_thread_.cpp:169–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void sys_ppu_thread_exit(ppu_thread& ppu, u64 val)
170{
171 sysPrxForUser.trace("sys_ppu_thread_exit(val=0x%llx)", val);
172
173 // Call registered atexit functions
174 ensure(!sys_lwmutex_lock(ppu, g_ppu_atexit_lwm, 0));
175
176 for (auto ptr : *g_ppu_atexit)
177 {
178 if (ptr)
179 {
180 ptr(ppu);
181 }
182 }
183
184 ensure(!sys_lwmutex_unlock(ppu, g_ppu_atexit_lwm));
185
186 // Deallocate TLS
187 ppu_free_tls(vm::cast(ppu.gpr[13]) - 0x7030);
188
189 // Call the syscall
190 _sys_ppu_thread_exit(ppu, val);
191}
192
193error_code sys_ppu_thread_register_atexit(ppu_thread& ppu, vm::ptr<void()> func)
194{

Callers 2

handler_wait_readyMethod · 0.85
handler_entryMethod · 0.85

Calls 6

sys_lwmutex_lockFunction · 0.85
sys_lwmutex_unlockFunction · 0.85
ppu_free_tlsFunction · 0.85
_sys_ppu_thread_exitFunction · 0.85
ensureFunction · 0.50
castFunction · 0.50

Tested by

no test coverage detected