mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 21:56:40 +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;
|
DWORD ErrorCode;
|
||||||
|
|
||||||
if (NtMarta == NULL)
|
if (InterlockedCompareExchangePointer(&NtMarta,
|
||||||
|
NULL,
|
||||||
|
NULL) == NULL)
|
||||||
{
|
{
|
||||||
/* we're the first one trying to use ntmarta, initialize it and change
|
/* we're the first one trying to use ntmarta, initialize it and change
|
||||||
the pointer after initialization */
|
the pointer after initialization */
|
||||||
|
|
Loading…
Reference in a new issue