summaryrefslogtreecommitdiffstats
path: root/include/pthread.h
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2005-05-31 15:18:17 +0000
committerrodrigc <rodrigc@FreeBSD.org>2005-05-31 15:18:17 +0000
commit055ba01ea7c6572a5b77318abf1834df648ee640 (patch)
treea89741dfe563bc77b481bcdae0e37ac958f4619a /include/pthread.h
parentdba46a3ce78931a31055af685eae287c6194a6bb (diff)
downloadFreeBSD-src-055ba01ea7c6572a5b77318abf1834df648ee640.zip
FreeBSD-src-055ba01ea7c6572a5b77318abf1834df648ee640.tar.gz
According to:
http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html #include <sys/types.h> should include the definitions of pthread types. PR: standards/78907 Reported by: Brooks Davis Approved by: das (mentor)
Diffstat (limited to 'include/pthread.h')
-rw-r--r--include/pthread.h57
1 files changed, 1 insertions, 56 deletions
diff --git a/include/pthread.h b/include/pthread.h
index 5da75ca..b0485c0 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -40,6 +40,7 @@
*/
#include <sys/cdefs.h>
#include <sys/types.h>
+#include <sys/_pthreadtypes.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <limits.h>
@@ -83,62 +84,6 @@
#define PTHREAD_CANCELED ((void *) 1)
/*
- * Forward structure definitions.
- *
- * These are mostly opaque to the user.
- */
-struct pthread;
-struct pthread_attr;
-struct pthread_cond;
-struct pthread_cond_attr;
-struct pthread_mutex;
-struct pthread_mutex_attr;
-struct pthread_once;
-struct pthread_rwlock;
-struct pthread_rwlockattr;
-struct pthread_barrier;
-struct pthread_barrier_attr;
-struct pthread_spinlock;
-
-/*
- * Primitive system data type definitions required by P1003.1c.
- *
- * Note that P1003.1c specifies that there are no defined comparison
- * or assignment operators for the types pthread_attr_t, pthread_cond_t,
- * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t.
- */
-typedef struct pthread *pthread_t;
-typedef struct pthread_attr *pthread_attr_t;
-typedef struct pthread_mutex *pthread_mutex_t;
-typedef struct pthread_mutex_attr *pthread_mutexattr_t;
-typedef struct pthread_cond *pthread_cond_t;
-typedef struct pthread_cond_attr *pthread_condattr_t;
-typedef int pthread_key_t;
-typedef struct pthread_once pthread_once_t;
-typedef struct pthread_rwlock *pthread_rwlock_t;
-typedef struct pthread_rwlockattr *pthread_rwlockattr_t;
-typedef struct pthread_barrier *pthread_barrier_t;
-typedef struct pthread_barrierattr *pthread_barrierattr_t;
-typedef struct pthread_spinlock *pthread_spinlock_t;
-
-/*
- * Additional type definitions:
- *
- * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for
- * use in header symbols.
- */
-typedef void *pthread_addr_t;
-typedef void *(*pthread_startroutine_t)(void *);
-
-/*
- * Once definitions.
- */
-struct pthread_once {
- int state;
- pthread_mutex_t mutex;
-};
-
-/*
* Flags for once initialization.
*/
#define PTHREAD_NEEDS_INIT 0
OpenPOWER on IntegriCloud