diff options
author | rpj <rpj> | 2004-09-13 04:32:16 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-09-13 04:32:16 +0000 |
commit | 531ca4db4794aab863a898b4d079ccd59b424b25 (patch) | |
tree | 0fb6d71aef115a8a01cd0252363f369517deed3c /pthread.h | |
parent | 4b0d69122798d07ac700941d3b649f1653750ce2 (diff) |
Clarify behaviour and remove some redundant code - see ChangeLogs
Diffstat (limited to 'pthread.h')
-rw-r--r-- | pthread.h | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -519,20 +519,20 @@ extern "C" #if defined(_UWIN) && PTW32_LEVEL >= PTW32_LEVEL_MAX # include <sys/types.h> #else -typedef struct pthread_t_ *pthread_t; -typedef struct pthread_attr_t_ *pthread_attr_t; +typedef struct pthread_t_ * volatile pthread_t; +typedef struct pthread_attr_t_ * volatile pthread_attr_t; 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_cond_t_ *pthread_cond_t; -typedef struct pthread_condattr_t_ *pthread_condattr_t; +typedef struct pthread_key_t_ * volatile pthread_key_t; +typedef struct pthread_mutex_t_ * volatile pthread_mutex_t; +typedef struct pthread_mutexattr_t_ * volatile pthread_mutexattr_t; +typedef struct pthread_cond_t_ * volatile pthread_cond_t; +typedef struct pthread_condattr_t_ * volatile pthread_condattr_t; #endif -typedef struct pthread_rwlock_t_ *pthread_rwlock_t; -typedef struct pthread_rwlockattr_t_ *pthread_rwlockattr_t; -typedef struct pthread_spinlock_t_ *pthread_spinlock_t; -typedef struct pthread_barrier_t_ *pthread_barrier_t; -typedef struct pthread_barrierattr_t_ *pthread_barrierattr_t; +typedef struct pthread_rwlock_t_ * volatile pthread_rwlock_t; +typedef struct pthread_rwlockattr_t_ * volatile pthread_rwlockattr_t; +typedef struct pthread_spinlock_t_ * volatile pthread_spinlock_t; +typedef struct pthread_barrier_t_ * volatile pthread_barrier_t; +typedef struct pthread_barrierattr_t_ * volatile pthread_barrierattr_t; /* * ==================== @@ -607,7 +607,7 @@ enum { struct pthread_once_t_ { - int done; /* indicates if user function executed */ + volatile int done; /* indicates if user function executed */ long started; /* First thread to increment this value */ /* to zero executes the user function */ }; |