https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fbd033df0ab725e412d4f8...
commit fbd033df0ab725e412d4f840427c06c58b61b365 Author: Justin Miller justinmiller100@gmail.com AuthorDate: Sat Mar 26 22:16:25 2022 -0700 Commit: George Bișoc george.bisoc@reactos.org CommitDate: Wed Dec 28 21:09:41 2022 +0100
[NTOS] fix timer lock data and hardcod --- ntoskrnl/ke/krnlinit.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/ke/krnlinit.c b/ntoskrnl/ke/krnlinit.c index d74d805715d..cac3e1f8007 100644 --- a/ntoskrnl/ke/krnlinit.c +++ b/ntoskrnl/ke/krnlinit.c @@ -60,7 +60,7 @@ KSPIN_LOCK IopDatabaseLock; KSPIN_LOCK IopCompletionLock; KSPIN_LOCK NtfsStructLock; KSPIN_LOCK AfdWorkQueueSpinLock; -KSPIN_LOCK KiTimerTableLock[16]; +KSPIN_LOCK KiTimerTableLock[LOCK_QUEUE_TIMER_TABLE_LOCKS]; KSPIN_LOCK KiReverseStallIpiLock;
/* FUNCTIONS *****************************************************************/ @@ -251,11 +251,14 @@ KiInitSpinLocks(IN PKPRCB Prcb, Prcb->LockQueue[LockQueueUnusedSpare16].Next = NULL; Prcb->LockQueue[LockQueueUnusedSpare16].Lock = NULL;
- /* Loop timer locks */ + /* Loop timer locks (shared amongst all CPUs) */ for (i = 0; i < LOCK_QUEUE_TIMER_TABLE_LOCKS; i++) { - /* Initialize the lock and setup the Queued Spinlock */ - KeInitializeSpinLock(&KiTimerTableLock[i]); + /* Setup the Queued Spinlock (done only once by the boot CPU) */ + if (!Number) + KeInitializeSpinLock(&KiTimerTableLock[i]); + + /* Initialize the lock */ Prcb->LockQueue[LockQueueTimerTableLock + i].Next = NULL; Prcb->LockQueue[LockQueueTimerTableLock + i].Lock = &KiTimerTableLock[i];