Update.
2004-09-08  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/pthread/pthread.h
	(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
	(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
	(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
	(PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
	[BZ #375]
This commit is contained in:
Ulrich Drepper 2004-09-09 04:59:02 +00:00
parent 062ad13224
commit 31f93b3b72
2 changed files with 33 additions and 8 deletions

View File

@ -1,3 +1,12 @@
2004-09-08 Ulrich Drepper <drepper@redhat.com>
* sysdeps/pthread/pthread.h
(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
(PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
[BZ #375]
2004-09-07 Ulrich Drepper <drepper@redhat.com> 2004-09-07 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow

View File

@ -27,6 +27,7 @@
#include <signal.h> #include <signal.h>
#include <bits/pthreadtypes.h> #include <bits/pthreadtypes.h>
#include <bits/setjmp.h> #include <bits/setjmp.h>
#include <bits/wordsize.h>
/* Detach state. */ /* Detach state. */
@ -63,12 +64,21 @@ enum
#define PTHREAD_MUTEX_INITIALIZER \ #define PTHREAD_MUTEX_INITIALIZER \
{ } { }
#ifdef __USE_GNU #ifdef __USE_GNU
# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ # if __WORDSIZE == 64
{ .__data = { .__kind = PTHREAD_MUTEX_RECURSIVE_NP } } # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
{ .__data = { .__kind = PTHREAD_MUTEX_ERRORCHECK_NP } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
{ .__data = { .__kind = PTHREAD_MUTEX_ADAPTIVE_NP } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
# else
# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
# endif
#endif #endif
@ -87,8 +97,14 @@ enum
#define PTHREAD_RWLOCK_INITIALIZER \ #define PTHREAD_RWLOCK_INITIALIZER \
{ } { }
#ifdef __USE_GNU #ifdef __USE_GNU
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ # if __WORDSIZE == 64
{ .__data = { .__flags = PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
# else
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
# endif
#endif #endif