include: Add YieldProcessor().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a3c295d4cf
commit
86fc30c105
|
@ -7154,6 +7154,19 @@ static FORCEINLINE void MemoryBarrier(void)
|
|||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
static FORCEINLINE void YieldProcessor(void)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
__asm__ __volatile__( "rep; nop" : : : "memory" );
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
__asm__ __volatile__( "dmb ishst\n\tyield" : : : "memory" );
|
||||
#else
|
||||
__asm__ __volatile__( "" : : : "memory" );
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue