Small modifications to compile under xcode.

This commit is contained in:
Paolo Cignoni 2011-12-17 11:52:27 +00:00
parent 091c1cbf8e
commit 83bbd0920f
1 changed files with 5 additions and 3 deletions

View File

@ -11,6 +11,10 @@ namespace mt{
class atomicInt class atomicInt
{ {
private:
volatile int _q_value;
public: public:
atomicInt() atomicInt()
{ {
@ -76,7 +80,7 @@ does nothing and returns false.
// return true; // return true;
// } // }
//return false; //return false;
return OSAtomicCompareAndSwap32Barrier(expectedValue, newValue, &_q_value)); return OSAtomicCompareAndSwap32Barrier(expectedValue, newValue, &_q_value);
} }
// Non-atomic API // Non-atomic API
@ -117,8 +121,6 @@ does nothing and returns false.
return _q_value < value; return _q_value < value;
} }
private:
volatile int _q_value;
}; };