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:
Zebediah Figura 2022-02-14 19:59:02 -06:00 committed by Alexandre Julliard
parent cfb1d2058f
commit 615a2ab53c
1 changed files with 1 additions and 10 deletions

View File

@ -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();
}
}