fixed: in Synchro: we should have a table (map) of reference counters
each one for each thread fixed: on Linux: pthread mutexes by default behaves differently than on FreeBSD we have to set PTHREAD_MUTEX_ERRORCHECK attribute when creating a mutex git-svn-id: svn://ttmath.org/publicrep/winix/trunk@953 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#define headerfile_winix_core_synchro
|
||||
|
||||
#include <pthread.h>
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace Winix
|
||||
@@ -35,9 +36,9 @@ struct Synchro
|
||||
|
||||
private:
|
||||
|
||||
// deadlock counter
|
||||
// deadlock counter for each thread
|
||||
// we can call Lock() more than one in the same thread
|
||||
int ref;
|
||||
std::map<pthread_t, int> ref;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user