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

Function acquire_reset_lock

kernel/cellos/src/lv2.cpp:1455–1471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1453}
1454
1455stx::reset_lock acquire_reset_lock(stx::init_mutex &mtx, ppu_thread *ppu) {
1456 if (!ppu) {
1457 ppu = ensure(cpu_thread::get_current<ppu_thread>());
1458 }
1459
1460 return mtx.reset(
1461 [](int invoke_count, const stx::init_lock &, ppu_thread *ppu) {
1462 if (!invoke_count) {
1463 // Sleep before waiting on lock
1464 lv2_obj::sleep(*ppu);
1465 } else {
1466 // Wake up after acquistion or failure to acquire
1467 ppu->check_state();
1468 }
1469 },
1470 ppu);
1471}
1472
1473class ppu_syscall_usage {
1474 // Internal buffer

Callers 1

cellGameContentPermitFunction · 0.85

Calls 3

ensureFunction · 0.50
resetMethod · 0.45
check_stateMethod · 0.45

Tested by

no test coverage detected