ntdll: Use YieldProcessor() in RtlEnterCriticalSection().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cfb1d2058f
commit
615a2ab53c
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue