mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 21:17:45 +00:00
Add atomics for Watcom/x86 as inline asm
Partially fixes Bugzilla #3758.
This commit is contained in:
@@ -125,6 +125,9 @@ void _ReadWriteBarrier(void);
|
||||
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#elif defined(__WATCOMC__)
|
||||
extern _inline void SDL_CompilerBarrier (void);
|
||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||
|
||||
Reference in New Issue
Block a user