src/atomic/SDL_atomic.c
changeset 12241 f72836cfb92b
parent 11811 5d94cb6b24d3
child 12503 806492103856
equal deleted inserted replaced
12240:08b190d518fc 12241:f72836cfb92b
    51 #   endif
    51 #   endif
    52 # endif
    52 # endif
    53 #endif
    53 #endif
    54 
    54 
    55 #if defined(__WATCOMC__) && defined(__386__)
    55 #if defined(__WATCOMC__) && defined(__386__)
       
    56 SDL_COMPILE_TIME_ASSERT(intsize, 4==sizeof(int));
    56 #define HAVE_WATCOM_ATOMICS
    57 #define HAVE_WATCOM_ATOMICS
    57 extern _inline int _SDL_xchg_watcom(volatile int *a, int v);
    58 extern _inline int _SDL_xchg_watcom(volatile int *a, int v);
    58 #pragma aux _SDL_xchg_watcom = \
    59 #pragma aux _SDL_xchg_watcom = \
    59   "xchg [ecx], eax" \
    60   "lock xchg [ecx], eax" \
    60   parm [ecx] [eax] \
    61   parm [ecx] [eax] \
    61   value [eax] \
    62   value [eax] \
    62   modify exact [eax];
    63   modify exact [eax];
    63 
    64 
    64 extern _inline unsigned char _SDL_cmpxchg_watcom(volatile int *a, int newval, int oldval);
    65 extern _inline unsigned char _SDL_cmpxchg_watcom(volatile int *a, int newval, int oldval);