mirror of
https://github.com/reactos/reactos.git
synced 2025-07-01 21:11:22 +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
|
// This routine must be entered with the PRCB lock held and it will exit
|
||||||
// with the PRCB lock released!
|
// with the PRCB lock released!
|
||||||
//
|
//
|
||||||
|
_Requires_lock_held_(Prcb->PrcbLock)
|
||||||
|
_Releases_lock_(Prcb->PrcbLock)
|
||||||
FORCEINLINE
|
FORCEINLINE
|
||||||
VOID
|
VOID
|
||||||
KxQueueReadyThread(IN PKTHREAD Thread,
|
KxQueueReadyThread(IN PKTHREAD Thread,
|
||||||
|
|
|
@ -26,6 +26,7 @@ NTSTATUS
|
||||||
KiConvertToGuiThread(
|
KiConvertToGuiThread(
|
||||||
VOID);
|
VOID);
|
||||||
|
|
||||||
|
_Requires_lock_not_held_(Prcb->PrcbLock)
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KiDpcInterruptHandler(VOID)
|
KiDpcInterruptHandler(VOID)
|
||||||
|
@ -61,6 +62,9 @@ KiDpcInterruptHandler(VOID)
|
||||||
}
|
}
|
||||||
else if (Prcb->NextThread)
|
else if (Prcb->NextThread)
|
||||||
{
|
{
|
||||||
|
/* Acquire the PRCB lock */
|
||||||
|
KiAcquirePrcbLock(Prcb);
|
||||||
|
|
||||||
/* Capture current thread data */
|
/* Capture current thread data */
|
||||||
OldThread = Prcb->CurrentThread;
|
OldThread = Prcb->CurrentThread;
|
||||||
NewThread = Prcb->NextThread;
|
NewThread = Prcb->NextThread;
|
||||||
|
|
|
@ -460,6 +460,7 @@ KiTimerListExpire(IN PLIST_ENTRY ExpiredListHead,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_Requires_lock_not_held_(Prcb->PrcbLock)
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KiQuantumEnd(VOID)
|
KiQuantumEnd(VOID)
|
||||||
|
|
|
@ -367,6 +367,9 @@ KeSetPriorityAndQuantumProcess(IN PKPROCESS Process,
|
||||||
/* Lock the process */
|
/* Lock the process */
|
||||||
KiAcquireProcessLockRaiseToSynch(Process, &ProcessLock);
|
KiAcquireProcessLockRaiseToSynch(Process, &ProcessLock);
|
||||||
|
|
||||||
|
/* Acquire the dispatcher lock */
|
||||||
|
KiAcquireDispatcherLockAtSynchLevel();
|
||||||
|
|
||||||
/* Check if we are modifying the quantum too */
|
/* Check if we are modifying the quantum too */
|
||||||
if (Quantum) Process->QuantumReset = Quantum;
|
if (Quantum) Process->QuantumReset = Quantum;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue