Zebediah Figura : ntdll: Use YieldProcessor() in RtlEnterCriticalSection().
Module: wine Branch: master Commit: 615a2ab53c9d9ecacd2c50e3c7fb9ab138bf1a1c URL: https://source.winehq.org/git/wine.git/?a=commit;h=615a2ab53c9d9ecacd2c50e3c... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Feb 14 19:59:02 2022 -0600 ntdll: Use YieldProcessor() in RtlEnterCriticalSection(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/sync.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 06b594c633f..43864325b35 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -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(); } }
participants (1)
-
Alexandre Julliard