[XboxKrnl/Threading] - implement KeInitializeTimerEx

- Taken from Crispy's Nukernel build
This commit is contained in:
The-Little-Wolf
2025-08-08 09:29:36 -07:00
committed by Radosław Gliński
parent e3c4b5aef5
commit 38ccc71afa
2 changed files with 22 additions and 0 deletions

View File

@@ -1802,6 +1802,27 @@ dword_result_t KeSetPriorityThread_entry(pointer_t<X_KTHREAD> thread_ptr,
}
DECLARE_XBOXKRNL_EXPORT1(KeSetPriorityThread, kThreading, kImplemented);
void xeKeInitializeTimerEx(X_KTIMER* timer, uint32_t type, uint32_t proctype,
PPCContext* context) {
xenia_assert(proctype < 3);
xenia_assert(type == 0 || type == 1);
// other fields are unmodified, they must carry through multiple calls of
// initialize
timer->header.process_type = proctype;
timer->header.inserted = 0;
timer->header.type = type + 8;
timer->header.signal_state = 0;
util::XeInitializeListHead(&timer->header.wait_list, context);
timer->due_time = 0;
timer->period = 0;
}
void KeInitializeTimerEx_entry(pointer_t<X_KTIMER> timer, dword_t type,
dword_t proctype, const ppc_context_t& context) {
xeKeInitializeTimerEx(timer, type, proctype & 0xFF, context);
}
DECLARE_XBOXKRNL_EXPORT1(KeInitializeTimerEx, kThreading, kImplemented);
} // namespace xboxkrnl
} // namespace kernel
} // namespace xe

View File

@@ -48,6 +48,7 @@ typedef struct {
union {
uint8_t size;
uint8_t hand;
uint8_t process_type;
};
union {
uint8_t inserted;