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

Function sys_timer_stop

kernel/cellos/src/sys_timer.cpp:316–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316error_code sys_timer_stop(ppu_thread &ppu, u32 timer_id) {
317 ppu.state += cpu_flag::wait;
318
319 sys_timer.trace("sys_timer_stop()");
320
321 const auto timer = idm::check<lv2_obj, lv2_timer>(
322 timer_id, [now = get_guest_system_time(),
323 notify = lv2_obj::notify_all_t()](lv2_timer &timer) {
324 std::lock_guard lock(timer.mutex);
325 timer.check_unlocked(now);
326 timer.state = SYS_TIMER_STATE_STOP;
327 });
328
329 if (!timer) {
330 return CELL_ESRCH;
331 }
332
333 return CELL_OK;
334}
335
336error_code sys_timer_connect_event_queue(ppu_thread &ppu, u32 timer_id,
337 u32 queue_id, u64 name, u64 data1,

Callers

nothing calls this directly

Calls 3

get_guest_system_timeFunction · 0.85
notify_all_tClass · 0.85
check_unlockedMethod · 0.45

Tested by

no test coverage detected