- attempt to make mutex usage more stable and find memory issues

This commit is contained in:
Mark Vejvoda
2013-04-05 05:39:30 +00:00
parent 7a39fae6d0
commit 8983592400
3 changed files with 75 additions and 45 deletions

View File

@@ -18,6 +18,7 @@
#include <SDL_thread.h>
#include <SDL_mutex.h>
#include <string>
#include <memory>
#include "data_types.h"
#ifdef DEBUG_PERFORMANCE_MUTEXES
@@ -59,7 +60,7 @@ private:
SDL_Thread* thread;
static Mutex mutexthreadList;
static std::vector<Thread *> threadList;
static vector<Thread *> threadList;
public:
Thread();
@@ -94,6 +95,10 @@ private:
Shared::PlatformCommon::Chrono *chronoPerf;
bool isStaticMutexListMutex;
static auto_ptr<Mutex> mutexMutexList;
static vector<Mutex *> mutexList;
public:
Mutex(string ownerId="");
~Mutex();