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:
2014-02-14 11:20:22 +00:00
parent 37b22c3559
commit 222955a2e7
5 changed files with 43 additions and 59 deletions

View File

@@ -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;
};