msvcr100: Use InterlockedDecrement in SpinWait::_SpinOnce.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Piotr Caban 2017-02-28 11:21:34 +01:00 committed by Alexandre Julliard
parent 26d30c6315
commit a6bfecd401
1 changed files with 1 additions and 7 deletions

View File

@ -265,13 +265,7 @@ MSVCRT_bool __thiscall SpinWait__SpinOnce(SpinWait *this)
SpinWait__Reset(this);
/* fall through */
case SPINWAIT_SPIN:
#ifdef __i386__
__asm__ __volatile__( "rep;nop" : : : "memory" );
#else
__asm__ __volatile__( "" : : : "memory" );
#endif
this->spin--;
InterlockedDecrement((LONG*)&this->spin);
if(!this->spin)
this->state = this->unknown ? SPINWAIT_YIELD : SPINWAIT_DONE;
return TRUE;