diff options
author | eivind <eivind@FreeBSD.org> | 1998-11-28 23:52:58 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1998-11-28 23:52:58 +0000 |
commit | 083b0d7688fa9abeb57de744e997044767be0259 (patch) | |
tree | 5f53d2cbe90934f9d98b0d8ba5cf3407e6fba004 /include/pthread.h | |
parent | 9eb948517872cbf893bb6f18d88ff5016b9fd899 (diff) | |
download | FreeBSD-src-083b0d7688fa9abeb57de744e997044767be0259.zip FreeBSD-src-083b0d7688fa9abeb57de744e997044767be0259.tar.gz |
Add support for pthread_mutexattr_settype(). As a side effect of
testing this, fix MUTEX_TYPE_COUNTING_FAST. Recursive locks now work.
Diffstat (limited to 'include/pthread.h')
-rw-r--r-- | include/pthread.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/pthread.h b/include/pthread.h index 0c38271..dc8ebf0 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -164,11 +164,16 @@ struct pthread_once { #endif enum pthread_mutextype { - MUTEX_TYPE_FAST = 1, - MUTEX_TYPE_COUNTING_FAST = 2, /* Recursive */ + PTHREAD_MUTEX_DEFAULT = 1, + PTHREAD_MUTEX_RECURSIVE = 2, + PTHREAD_MUTEX_NORMAL = 3, + PTHREAD_MUTEX_ERRORCHECK = 4, MUTEX_TYPE_MAX }; +#define MUTEX_TYPE_FAST PTHREAD_MUTEX_DEFAULT +#define MUTEX_TYPE_COUNTING_FAST PTHREAD_MUTEX_RECURSIVE + /* * Thread function prototype definitions: */ @@ -233,6 +238,7 @@ int pthread_mutexattr_setprotocol __P((pthread_mutexattr_t *, int protocol)); int pthread_mutexattr_setpshared __P((pthread_mutexattr_t *, int pshared)); +int pthread_mutexattr_settype __P((pthread_mutexattr_t *, int)); int pthread_mutex_destroy __P((pthread_mutex_t *)); int pthread_mutex_getprioceiling __P((pthread_mutex_t *)); int pthread_mutex_init __P((pthread_mutex_t *, |