KeCancelTimer
This commit is contained in:
parent
b6fce711a9
commit
71572d8c90
|
@ -519,16 +519,26 @@ XBSYSAPI EXPORTNUM(96) xboxkrnl::BOOLEAN NTAPI xboxkrnl::KeCancelTimer
|
|||
IN PKTIMER Timer
|
||||
)
|
||||
{
|
||||
LOG_FUNC_ONE_ARG(Timer);
|
||||
|
||||
BOOLEAN Inserted;
|
||||
|
||||
Inserted = Timer->Header.Inserted;
|
||||
if (Inserted != FALSE) {
|
||||
// Do some unlinking if already inserted in the linked list
|
||||
KiRemoveTreeTimer(Timer);
|
||||
}
|
||||
|
||||
LOG_FUNC_ONE_ARG(Timer);
|
||||
|
||||
KIRQL OldIrql;
|
||||
BOOLEAN Inserted;
|
||||
|
||||
assert(Timer);
|
||||
|
||||
/* Lock the Database and Raise IRQL */
|
||||
KiLockDispatcherDatabase(&OldIrql);
|
||||
|
||||
/* Check if it's inserted, and remove it if it is */
|
||||
Inserted = Timer->Header.Inserted;
|
||||
if (Inserted) {
|
||||
KxRemoveTreeTimer(Timer);
|
||||
}
|
||||
|
||||
/* Release Dispatcher Lock */
|
||||
KiUnlockDispatcherDatabase(OldIrql);
|
||||
|
||||
/* Return the old state */
|
||||
RETURN(Inserted);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,11 +40,7 @@
|
|||
*(OldIrql) = KeRaiseIrqlToSynchLevel()
|
||||
|
||||
#define KiUnlockApcQueue(Thread, OldIrql) \
|
||||
KfLowerIrql((OldIrql))
|
||||
|
||||
#define KiRemoveTreeTimer(Timer) \
|
||||
(Timer)->Header.Inserted = FALSE; \
|
||||
RemoveEntryList(&(Timer)->TimerListEntry)
|
||||
KfLowerIrql((OldIrql))
|
||||
|
||||
namespace xboxkrnl
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue