trunk/src/osd/windows/osinline.h
| r242710 | r242711 | |
| 19 | 19 | #include "eivc.h" |
| 20 | 20 | #endif |
| 21 | 21 | |
| 22 | | #if __GNUC__ && defined(__i386__) && !defined(__x86_64) |
| 23 | | #undef YieldProcessor |
| 24 | | #endif |
| 25 | | |
| 26 | | #ifndef YieldProcessor |
| 27 | | #ifdef __GNUC__ |
| 28 | | INLINE void osd_yield_processor(void) |
| 29 | | { |
| 30 | | __asm__ __volatile__ ( "rep; nop" ); |
| 31 | | } |
| 32 | | #else |
| 33 | | INLINE void osd_yield_processor(void) |
| 34 | | { |
| 35 | | __asm { rep nop } |
| 36 | | } |
| 37 | | #endif |
| 38 | | #else |
| 39 | | #define osd_yield_processor YieldProcessor |
| 40 | | #endif |
| 41 | | |
| 42 | 22 | INT32 win_compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange); |
| 43 | 23 | INT32 win_atomic_exchange32(INT32 volatile *ptr, INT32 exchange); |
| 44 | 24 | INT32 win_atomic_add32(INT32 volatile *ptr, INT32 delta); |
trunk/src/osd/windows/winwork.c
| r242710 | r242711 | |
| 25 | 25 | |
| 26 | 26 | #include "eminline.h" |
| 27 | 27 | |
| 28 | | #include "osinline.h" |
| 29 | 28 | |
| 30 | | |
| 31 | 29 | //============================================================ |
| 32 | 30 | // DEBUGGING |
| 33 | 31 | //============================================================ |
| r242710 | r242711 | |
| 59 | 57 | #define end_timing(v) do { } while (0) |
| 60 | 58 | #endif |
| 61 | 59 | |
| 60 | #if __GNUC__ && defined(__i386__) && !defined(__x86_64) |
| 61 | #undef YieldProcessor |
| 62 | #endif |
| 63 | |
| 64 | #ifndef YieldProcessor |
| 65 | #ifdef __GNUC__ |
| 66 | INLINE void osd_yield_processor(void) |
| 67 | { |
| 68 | __asm__ __volatile__ ( "rep; nop" ); |
| 69 | } |
| 70 | #else |
| 71 | INLINE void osd_yield_processor(void) |
| 72 | { |
| 73 | __asm { rep nop } |
| 74 | } |
| 75 | #endif |
| 76 | #else |
| 77 | #define osd_yield_processor YieldProcessor |
| 78 | #endif |
| 79 | |
| 80 | |
| 81 | |
| 62 | 82 | //============================================================ |
| 63 | 83 | // TYPE DEFINITIONS |
| 64 | 84 | //============================================================ |