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:
coppro
2008-08-01 20:58:09 +00:00
parent 4e55f0a208
commit b49966dc03
6 changed files with 21 additions and 5 deletions
+2 -2
View File
@@ -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;