mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Updates, including improvement to atomic code to ensure portability.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1031 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+2
-2
@@ -54,7 +54,7 @@
|
||||
#define HAVE_FAST_ATOMIC
|
||||
|
||||
// ----------------------------------------------------------------------------- : AtomicInt : GCC
|
||||
#elif defined(__GNUC__)
|
||||
#elif defined(__GNUC__) && defined(__i486)
|
||||
|
||||
/// An integer which is equivalent to an AtomicInt, but which doesn't support attomic operations
|
||||
typedef unsigned int AtomicIntEquiv;
|
||||
@@ -70,7 +70,7 @@
|
||||
return __sync_add_and_fetch(&v,1);
|
||||
}
|
||||
inline AtomicInt operator -- () {
|
||||
return __sync_add_and_fetch(&v,(AtomicIntEquiv)-1);
|
||||
return __sync_sub_and_fetch(&v,1);
|
||||
}
|
||||
private:
|
||||
AtomicIntEquiv v;
|
||||
|
||||
Reference in New Issue
Block a user