Implement boost and stl mutexes and atomics.

This commit is contained in:
Shyotl
2014-09-07 17:18:55 -05:00
parent aeeca6e2c0
commit 37c7a72505
22 changed files with 583 additions and 483 deletions

View File

@@ -239,7 +239,7 @@ protected:
// For use by AIThreadSafeDC
AIThreadSafe(void) { }
AIThreadSafe(LLAPRPool& parent) : mRWLock(parent) { }
MUTEX_POOL(AIThreadSafe(LLAPRPool& parent) : mRWLock(parent){ })
public:
// Only for use by AITHREADSAFE, see below.
@@ -473,7 +473,7 @@ protected:
friend struct AIRegisteredStateMachinesList;
// For use by AIThreadSafeSimpleDC and AIRegisteredStateMachinesList.
AIThreadSafeSimple(void) { }
AIThreadSafeSimple(LLAPRPool& parent) : mMutex(parent) { }
MUTEX_POOL(AIThreadSafeSimple(LLAPRPool& parent) : mMutex(parent) { })
public:
// Only for use by AITHREADSAFESIMPLE, see below.
@@ -551,7 +551,7 @@ public:
protected:
// For use by AIThreadSafeSimpleDCRootPool
AIThreadSafeSimpleDC(LLAPRRootPool& parent) : AIThreadSafeSimple<T, MUTEX>(parent) { new (AIThreadSafeSimple<T, MUTEX>::ptr()) T; }
AIThreadSafeSimpleDC(LLAPRRootPool& parent) : AIThreadSafeSimple<T, MUTEX>(MUTEX_POOL(parent)) { new (AIThreadSafeSimple<T, MUTEX>::ptr()) T; }
};
// Helper class for AIThreadSafeSimpleDCRootPool to assure initialization of
@@ -585,7 +585,7 @@ public:
// as opposed to allocated from the current threads root pool.
AIThreadSafeSimpleDCRootPool(void) :
AIThreadSafeSimpleDCRootPool_pbase(),
AIThreadSafeSimpleDC<T>(mRootPool) { }
AIThreadSafeSimpleDC<T>(MUTEX_POOL(mRootPool)) { }
};
/**