mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[CSRSRV] Fix locking logic when destroying threads & processes
This commit is contained in:
parent
f5bace8536
commit
7054cd10b1
2 changed files with 4 additions and 2 deletions
|
@ -167,8 +167,9 @@ CsrLockedDereferenceProcess(PCSR_PROCESS CsrProcess)
|
|||
{
|
||||
/* Call the generic cleanup code */
|
||||
DPRINT1("Should kill process: %p\n", CsrProcess);
|
||||
CsrAcquireProcessLock();
|
||||
CsrProcessRefcountZero(CsrProcess);
|
||||
/* Acquire again, the lock it was released in CsrProcessRefcountZero */
|
||||
CsrAcquireProcessLock();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -474,8 +474,9 @@ CsrLockedDereferenceThread(IN PCSR_THREAD CsrThread)
|
|||
if (LockCount == 0)
|
||||
{
|
||||
/* Call the generic cleanup code */
|
||||
CsrAcquireProcessLock();
|
||||
CsrThreadRefcountZero(CsrThread);
|
||||
/* Acquire the lock again, it was released by CsrThreadRefcountZero */
|
||||
CsrAcquireProcessLock();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue