mirror of
https://github.com/reactos/reactos.git
synced 2024-07-22 20:28:08 +00:00
Fix race condition
svn path=/trunk/; revision=30501
This commit is contained in:
parent
910520b648
commit
a5728dd37f
|
@ -69,7 +69,9 @@ CheckNtMartaPresent(VOID)
|
|||
{
|
||||
DWORD ErrorCode;
|
||||
|
||||
if (NtMarta == NULL)
|
||||
if (InterlockedCompareExchangePointer(&NtMarta,
|
||||
NULL,
|
||||
NULL) == NULL)
|
||||
{
|
||||
/* we're the first one trying to use ntmarta, initialize it and change
|
||||
the pointer after initialization */
|
||||
|
|
Loading…
Reference in a new issue