summaryrefslogtreecommitdiff
path: root/pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'pthread.h')
-rw-r--r--pthread.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/pthread.h b/pthread.h
index aa48b32..29e691f 100644
--- a/pthread.h
+++ b/pthread.h
@@ -415,7 +415,7 @@ extern "C"
typedef struct pthread_once_t_ pthread_once_t;
typedef struct pthread_key_t_ *pthread_key_t;
typedef struct pthread_mutex_t_ pthread_mutex_t;
- typedef struct pthread_mutexattr_t_ pthread_mutexattr_t;
+ typedef struct pthread_mutexattr_t_ *pthread_mutexattr_t;
typedef struct pthread_cond_t_ *pthread_cond_t;
typedef struct pthread_condattr_t_ *pthread_condattr_t;
@@ -460,10 +460,10 @@ extern "C"
* ====================
*/
-/* FIXME: Replace the NULL with a valid critical section initializer
- * and then also change the 0 (first element) to 1.
+/*
+ *
*/
-#define PTHREAD_MUTEX_INITIALIZER { 0, NULL }
+#define PTHREAD_MUTEX_INITIALIZER { 1, 1, 0, NULL }
/*
@@ -569,13 +569,16 @@ struct pthread_attr_t_ {
struct pthread_mutex_t_ {
- int valid;
- CRITICAL_SECTION cs;
- };
+ int staticinit;
+ int valid;
+ HANDLE mutex;
+ CRITICAL_SECTION cs;
+};
struct pthread_mutexattr_t_ {
int pshared;
+ int forcecs;
};
@@ -838,6 +841,9 @@ int pthread_mutexattr_getpshared (const pthread_mutexattr_t
int pthread_mutexattr_setpshared (pthread_mutexattr_t * attr,
int pshared);
+int pthread_mutexattr_setforcecs_np(pthread_mutexattr_t *attr,
+ int forcecs);
+
/*
* Mutex Functions
*/