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

Method check_unlocked

kernel/cellos/src/sys_timer.cpp:67–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67u64 lv2_timer::check_unlocked(u64 _now) noexcept {
68 const u64 next = expire;
69
70 if (_now < next || state != SYS_TIMER_STATE_RUN) {
71 return umax;
72 }
73
74 if (port) {
75 port->send(source, data1, data2, next);
76 }
77
78 if (period) {
79 // Set next expiration time and check again
80 const u64 expire0 = rx::add_saturate<u64>(next, period);
81 expire.release(expire0);
82 return rx::sub_saturate<u64>(expire0, _now);
83 }
84
85 // Stop after oneshot
86 state.release(SYS_TIMER_STATE_STOP);
87 return umax;
88}
89
90lv2_timer_thread::lv2_timer_thread() {
91 Emu.PostponeInitCode([this]() {

Callers 4

_sys_timer_startFunction · 0.45
sys_timer_stopFunction · 0.45

Calls 2

sendMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected