mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:23:01 +00:00
[RTL]
- Use portable interlocked functions in code, define them to intrinsics for x86 and x64 in the header svn path=/branches/cmake-bringup/; revision=49680
This commit is contained in:
parent
0b8509a565
commit
45a06d507a
8 changed files with 56 additions and 48 deletions
|
@ -91,7 +91,7 @@ Wait_thread_proc(LPVOID Arg)
|
|||
completion_event = Wait->CompletionEvent;
|
||||
if (completion_event) NtSetEvent( completion_event, NULL );
|
||||
|
||||
if (_InterlockedIncrement( &Wait->DeleteCount ) == 2 )
|
||||
if (InterlockedIncrement( &Wait->DeleteCount ) == 2 )
|
||||
{
|
||||
NtClose( Wait->CancelEvent );
|
||||
RtlFreeHeap( RtlGetProcessHeap(), 0, Wait );
|
||||
|
@ -220,7 +220,7 @@ RtlDeregisterWaitEx(HANDLE WaitHandle,
|
|||
if (Status != STATUS_SUCCESS)
|
||||
return Status;
|
||||
|
||||
(void)_InterlockedExchangePointer( &Wait->CompletionEvent, CompletionEvent );
|
||||
(void)InterlockedExchangePointer( &Wait->CompletionEvent, CompletionEvent );
|
||||
|
||||
if (Wait->CallbackInProgress)
|
||||
NtWaitForSingleObject( CompletionEvent, FALSE, NULL );
|
||||
|
@ -229,7 +229,7 @@ RtlDeregisterWaitEx(HANDLE WaitHandle,
|
|||
}
|
||||
else
|
||||
{
|
||||
(void)_InterlockedExchangePointer( &Wait->CompletionEvent, CompletionEvent );
|
||||
(void)InterlockedExchangePointer( &Wait->CompletionEvent, CompletionEvent );
|
||||
|
||||
if (Wait->CallbackInProgress)
|
||||
Status = STATUS_PENDING;
|
||||
|
@ -239,7 +239,7 @@ RtlDeregisterWaitEx(HANDLE WaitHandle,
|
|||
Status = STATUS_PENDING;
|
||||
}
|
||||
|
||||
if (_InterlockedIncrement( &Wait->DeleteCount ) == 2 )
|
||||
if (InterlockedIncrement( &Wait->DeleteCount ) == 2 )
|
||||
{
|
||||
Status = STATUS_SUCCESS;
|
||||
NtClose( Wait->CancelEvent );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue