mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:KE] Fix some locking issues
This commit is contained in:
parent
62f62da8ba
commit
a011d19ed2
4 changed files with 10 additions and 0 deletions
|
@ -1347,6 +1347,8 @@ KxUnwaitThreadForEvent(IN PKEVENT Event,
|
|||
// This routine must be entered with the PRCB lock held and it will exit
|
||||
// with the PRCB lock released!
|
||||
//
|
||||
_Requires_lock_held_(Prcb->PrcbLock)
|
||||
_Releases_lock_(Prcb->PrcbLock)
|
||||
FORCEINLINE
|
||||
VOID
|
||||
KxQueueReadyThread(IN PKTHREAD Thread,
|
||||
|
|
|
@ -26,6 +26,7 @@ NTSTATUS
|
|||
KiConvertToGuiThread(
|
||||
VOID);
|
||||
|
||||
_Requires_lock_not_held_(Prcb->PrcbLock)
|
||||
VOID
|
||||
NTAPI
|
||||
KiDpcInterruptHandler(VOID)
|
||||
|
@ -61,6 +62,9 @@ KiDpcInterruptHandler(VOID)
|
|||
}
|
||||
else if (Prcb->NextThread)
|
||||
{
|
||||
/* Acquire the PRCB lock */
|
||||
KiAcquirePrcbLock(Prcb);
|
||||
|
||||
/* Capture current thread data */
|
||||
OldThread = Prcb->CurrentThread;
|
||||
NewThread = Prcb->NextThread;
|
||||
|
|
|
@ -460,6 +460,7 @@ KiTimerListExpire(IN PLIST_ENTRY ExpiredListHead,
|
|||
}
|
||||
}
|
||||
|
||||
_Requires_lock_not_held_(Prcb->PrcbLock)
|
||||
VOID
|
||||
NTAPI
|
||||
KiQuantumEnd(VOID)
|
||||
|
|
|
@ -367,6 +367,9 @@ KeSetPriorityAndQuantumProcess(IN PKPROCESS Process,
|
|||
/* Lock the process */
|
||||
KiAcquireProcessLockRaiseToSynch(Process, &ProcessLock);
|
||||
|
||||
/* Acquire the dispatcher lock */
|
||||
KiAcquireDispatcherLockAtSynchLevel();
|
||||
|
||||
/* Check if we are modifying the quantum too */
|
||||
if (Quantum) Process->QuantumReset = Quantum;
|
||||
|
||||
|
|
Loading…
Reference in a new issue