summaryrefslogtreecommitdiff
path: root/pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'pthread.h')
-rw-r--r--pthread.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/pthread.h b/pthread.h
index 415602c..d08eac3 100644
--- a/pthread.h
+++ b/pthread.h
@@ -491,8 +491,14 @@ extern "C"
* ====================
* ====================
*/
-#define PTHREAD_ONCE_INIT { 0, PTHREAD_MUTEX_INITIALIZER }
+#define PTHREAD_ONCE_INIT { FALSE, -1 }
+struct pthread_once_t_
+{
+ int done; /* indicates if user function executed */
+ long started; /* First thread to increment this value */
+ /* to zero executes the user function */
+};
/*
* ====================