Sam Lantinga
8f205278b1
It's now possible to disable the fast atomic operations, at a huge performance penalty.
2011-02-07 22:57:33 -08:00
Sam Lantinga
fc5dc0ddb2
More fixes for compilation on Visual Studio
2011-01-25 18:02:41 -08:00
Sam Lantinga
29e0bf97e0
Improvements based on feedback from Anthony Williams
2011-01-25 17:40:06 -08:00
Sam Lantinga
f98d804282
Only include windows.h on Windows. :)
2011-01-24 21:22:00 -08:00
Sam Lantinga
b4497865bd
Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
...
I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c
--HG--
rename : src/SDL_android.cpp => src/core/android/SDL_android.cpp
rename : src/SDL_android.h => src/core/android/SDL_android.h
2011-01-24 21:20:30 -08:00
Sam Lantinga
10b8372bd3
Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008
2011-01-24 15:46:11 -08:00
Sam Lantinga
c4bf458e47
Fixed bug #1097
...
There are problems with including intrin.h in C linkage in C++ compilation,
and further conflicts between intrin.h and winnt.h on Visual Studio 2005.
2011-01-21 23:46:51 -08:00
Sam Lantinga
daecbfdc17
HAVE_GCC_ATOMICS covers the test and set
2011-01-21 21:45:55 -08:00
Sam Lantinga
2c31531800
Separated out the minimum functionality that we need from gcc for our spinlock fallback.
2011-01-21 21:42:04 -08:00
Sam Lantinga
5601ecaeae
Whoops, good catch from Greg Jandl
2011-01-18 22:10:37 -08:00
Sam Lantinga
cdb1bda300
Use compiler intrinsics on Windows
2011-01-17 14:05:43 -08:00
Sam Lantinga
b0e0f61c7e
Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
...
Changed the CAS return value to bool, so it's efficient with OSAtomicCompareAndSwap32Barrier()
Added an atomic test adapted from code by Michael Davidsaver
2011-01-16 15:16:39 -08:00
Sam Lantinga
1bc8fe69ce
Updated the atomic API for better use cases
2011-01-15 12:41:59 -08:00