Commit 615a2ab5 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntdll: Use YieldProcessor() in RtlEnterCriticalSection().

parent cfb1d205
......@@ -373,15 +373,6 @@ NTSTATUS WINAPI RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit )
}
static inline void small_pause(void)
{
#ifdef __i386__
__asm__ __volatile__( "rep;nop" : : : "memory" );
#else
__asm__ __volatile__( "" : : : "memory" );
#endif
}
/******************************************************************************
* RtlEnterCriticalSection (NTDLL.@)
*/
......@@ -399,7 +390,7 @@ NTSTATUS WINAPI RtlEnterCriticalSection( RTL_CRITICAL_SECTION *crit )
{
if (InterlockedCompareExchange( &crit->LockCount, 0, -1 ) == -1) goto done;
}
small_pause();
YieldProcessor();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment