This commit is contained in:
Angelo Salese 2015-01-06 01:37:03 +01:00
commit 0da897e990
2 changed files with 22 additions and 22 deletions

View File

@ -19,26 +19,6 @@
#include "eivc.h"
#endif
#if __GNUC__ && defined(__i386__) && !defined(__x86_64)
#undef YieldProcessor
#endif
#ifndef YieldProcessor
#ifdef __GNUC__
INLINE void osd_yield_processor(void)
{
__asm__ __volatile__ ( "rep; nop" );
}
#else
INLINE void osd_yield_processor(void)
{
__asm { rep nop }
}
#endif
#else
#define osd_yield_processor YieldProcessor
#endif
INT32 win_compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange);
INT32 win_atomic_exchange32(INT32 volatile *ptr, INT32 exchange);
INT32 win_atomic_add32(INT32 volatile *ptr, INT32 delta);

View File

@ -25,8 +25,6 @@
#include "eminline.h"
#include "osinline.h"
//============================================================
// DEBUGGING
@ -59,6 +57,28 @@
#define end_timing(v) do { } while (0)
#endif
#if __GNUC__ && defined(__i386__) && !defined(__x86_64)
#undef YieldProcessor
#endif
#ifndef YieldProcessor
#ifdef __GNUC__
INLINE void osd_yield_processor(void)
{
__asm__ __volatile__ ( "rep; nop" );
}
#else
INLINE void osd_yield_processor(void)
{
__asm { rep nop }
}
#endif
#else
#define osd_yield_processor YieldProcessor
#endif
//============================================================
// TYPE DEFINITIONS
//============================================================