diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-06-01 20:25:36 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-04-07 23:16:53 +0200 |
commit | e48957feb55420710f89d88ca5a45ce08551ff12 (patch) | |
tree | 066cbf6b8a4905b3cb28d9253ac1f9b818f2d265 /include/pthread/pthread.h | |
parent | 447867550c9ea153fdaa9966e92fd11cf543953f (diff) |
2008-06-01 Neal H. Walfield <neal@gnu.org>
* include/pthread/pthread.h (PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP):
New definition.
* sysdeps/generic/bits/mutex.h
(__PTHREAD_MUTEX_RECURSIVE_INITIALIZER): New definition.
* sysdeps/generic/bits/mutex-attr.h (__pthread_recursive_mutexattr):
New definition.
* sysdeps/generic/pt-mutexattr.c (__pthread_recursive_mutexattr):
New declaration.
* sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): If ATTR
is &__PTHREAD_RECURSIVE_MUTEXATTR, don't allocate a copy, just
save in MUTEX->ATTR.
* sysdeps/generic/pt-mutex-destroy.c (_pthread_mutex_destroy): If
MUTEX->ATTR is &__PTHREAD_RECURSIVE_MUTEXATTR, don't free it.
Diffstat (limited to 'include/pthread/pthread.h')
-rw-r--r-- | include/pthread/pthread.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/pthread/pthread.h b/include/pthread/pthread.h index 0437550..7f69573 100644 --- a/include/pthread/pthread.h +++ b/include/pthread/pthread.h @@ -314,6 +314,9 @@ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, typedef struct __pthread_mutex pthread_mutex_t; #define PTHREAD_MUTEX_INITIALIZER __PTHREAD_MUTEX_INITIALIZER +/* Static initializer for recursive mutexes. */ +#define PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP \ + __PTHREAD_MUTEX_RECURSIVE_INITIALIZER /* Create a mutex with attributes given by ATTR and store it in *__MUTEX. */ |