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

Function sys_lwcond_create

ps3fw/sys_lwcond_.cpp:11–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9LOG_CHANNEL(sysPrxForUser);
10
11error_code sys_lwcond_create(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond, vm::ptr<sys_lwmutex_t> lwmutex, vm::ptr<sys_lwcond_attribute_t> attr)
12{
13 sysPrxForUser.trace("sys_lwcond_create(lwcond=*0x%x, lwmutex=*0x%x, attr=*0x%x)", lwcond, lwmutex, attr);
14
15 vm::var<u32> out_id;
16 vm::var<sys_cond_attribute_t> attrs;
17 attrs->pshared = SYS_SYNC_NOT_PROCESS_SHARED;
18 attrs->name_u64 = attr->name_u64;
19
20 if (auto res = g_cfg.core.hle_lwmutex ? sys_cond_create(ppu, out_id, lwmutex->sleep_queue, attrs) : _sys_lwcond_create(ppu, out_id, lwmutex->sleep_queue, lwcond, std::bit_cast<be_t<u64>>(attr->name_u64)))
21 {
22 return res;
23 }
24
25 lwcond->lwmutex = lwmutex;
26 lwcond->lwcond_queue = *out_id;
27 return CELL_OK;
28}
29
30error_code sys_lwcond_destroy(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond)
31{

Callers

nothing calls this directly

Calls 2

sys_cond_createFunction · 0.85
_sys_lwcond_createFunction · 0.85

Tested by

no test coverage detected