msvcr100: Use InterlockedDecrement in SpinWait::_SpinOnce.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
26d30c6315
commit
a6bfecd401
|
@ -265,13 +265,7 @@ MSVCRT_bool __thiscall SpinWait__SpinOnce(SpinWait *this)
|
||||||
SpinWait__Reset(this);
|
SpinWait__Reset(this);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case SPINWAIT_SPIN:
|
case SPINWAIT_SPIN:
|
||||||
#ifdef __i386__
|
InterlockedDecrement((LONG*)&this->spin);
|
||||||
__asm__ __volatile__( "rep;nop" : : : "memory" );
|
|
||||||
#else
|
|
||||||
__asm__ __volatile__( "" : : : "memory" );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
this->spin--;
|
|
||||||
if(!this->spin)
|
if(!this->spin)
|
||||||
this->state = this->unknown ? SPINWAIT_YIELD : SPINWAIT_DONE;
|
this->state = this->unknown ? SPINWAIT_YIELD : SPINWAIT_DONE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue