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

Function sys_timer_get_information

kernel/cellos/src/sys_timer.cpp:203–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203error_code sys_timer_get_information(ppu_thread &ppu, u32 timer_id,
204 vm::ptr<sys_timer_information_t> info) {
205 ppu.state += cpu_flag::wait;
206
207 sys_timer.trace("sys_timer_get_information(timer_id=0x%x, info=*0x%x)",
208 timer_id, info);
209
210 sys_timer_information_t _info{};
211 const u64 now = get_guest_system_time();
212
213 const auto timer =
214 idm::check<lv2_obj, lv2_timer>(timer_id, [&](lv2_timer &timer) {
215 std::lock_guard lock(timer.mutex);
216
217 timer.check_unlocked(now);
218 timer.get_information(_info);
219 });
220
221 if (!timer) {
222 return CELL_ESRCH;
223 }
224
225 ppu.check_state();
226 std::memcpy(info.get_ptr(), &_info, info.size());
227 return CELL_OK;
228}
229
230error_code _sys_timer_start(ppu_thread &ppu, u32 timer_id, u64 base_time,
231 u64 period) {

Callers

nothing calls this directly

Calls 6

get_guest_system_timeFunction · 0.85
get_informationMethod · 0.80
check_unlockedMethod · 0.45
check_stateMethod · 0.45
get_ptrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected