From 9ef8c569d52f527b2410d5afd31bd4660c87d99f Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Mon, 29 Jun 2026 16:04:28 +0200 Subject: [PATCH] Add event priority boost stub --- xtoskrnl/includes/ke/event.hh | 2 ++ xtoskrnl/ke/event.cc | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/xtoskrnl/includes/ke/event.hh b/xtoskrnl/includes/ke/event.hh index 74cdd4c..3b61da9 100644 --- a/xtoskrnl/includes/ke/event.hh +++ b/xtoskrnl/includes/ke/event.hh @@ -25,6 +25,8 @@ namespace KE STATIC XTAPI LONG SetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait); + STATIC XTAPI VOID SetEventBoostPriority(IN PKEVENT Event, + IN OUT PKTHREAD* WaitingThread); }; } diff --git a/xtoskrnl/ke/event.cc b/xtoskrnl/ke/event.cc index 83b4020..9e39d1c 100644 --- a/xtoskrnl/ke/event.cc +++ b/xtoskrnl/ke/event.cc @@ -83,3 +83,35 @@ KE::Event::SetEvent(IN PKEVENT Event, return 0; } + +/** + * Sets an event to the signaled state and attempts to boost the priority of the waiting thread. + * + * @param Event + * Supplies a pointer to the dispatcher object (Event) to be signaled. + * + * @param WaitingThread + * supplies an optional pointer to a variable that receives the unblocked thread. + * + * @return This routine does not return any value. + * + * @since XT 1.0 + */ +XTAPI +VOID +KE::Event::SetEventBoostPriority(IN PKEVENT Event, + IN OUT PKTHREAD* WaitingThread) +{ + /* Not implemented, active polling only */ + UNIMPLEMENTED; + + /* Set the signal state */ + Event->Header.SignalState = 1; + + /* Check if the caller requested the unblocked thread */ + if(WaitingThread != NULLPTR) + { + /* Return NULLPTR for now */ + *WaitingThread = NULLPTR; + } +}