Applied pthread_mutex patch

This commit is contained in:
Thomas Pfaff
2003-01-09 20:50:23 +00:00
parent a54470c774
commit 5d68d1de45
4 changed files with 189 additions and 88 deletions

View File

@ -162,6 +162,8 @@ private:
#define SEM_MAGIC PTHREAD_MAGIC+7
#define PTHREAD_ONCE_MAGIC PTHREAD_MAGIC+8;
#define MUTEX_LOCK_COUNTER_INITIAL (-1)
/* verifyable_object should not be defined here - it's a general purpose class */
class verifyable_object
@ -305,15 +307,21 @@ public:
static void initMutex ();
static int init (pthread_mutex_t *, const pthread_mutexattr_t *);
CRITICAL_SECTION criticalsection;
LONG lock_counter;
HANDLE win32_obj_id;
unsigned int recursion_counter;
LONG condwaits;
pthread_t owner;
int type;
int pshared;
class pthread_mutex * next;
int Lock ();
int TryLock ();
int UnLock ();
int Destroy ();
void SetOwner ();
int LockRecursive ();
void fixup_after_fork ();
pthread_mutex (pthread_mutexattr * = NULL);