diff options
author | Uros Bizjak <uros@kss-loka.si> | 2006-10-03 07:52:05 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2006-10-03 07:52:05 +0200 |
commit | 4d98def06f2eb0fe9169d6d61f907fda91d33ea4 (patch) | |
tree | 00c426b2364c9235ae1659b9df36e06c02cd0647 /fixincludes/tests/base/pthread.h | |
parent | 6aacba37551b5235eb7958186c308337cfba8a0c (diff) | |
download | gcc-4d98def06f2eb0fe9169d6d61f907fda91d33ea4.zip gcc-4d98def06f2eb0fe9169d6d61f907fda91d33ea4.tar.gz gcc-4d98def06f2eb0fe9169d6d61f907fda91d33ea4.tar.bz2 |
inclhack.def (glibc_mutex_init): Also fix PTHREAD_MUTEX_(RECURSIVE|ERRORCHECK|ADAPTIVE)_NP and...
* inclhack.def (glibc_mutex_init): Also fix
PTHREAD_MUTEX_(RECURSIVE|ERRORCHECK|ADAPTIVE)_NP and
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP initializers.
From-SVN: r117386
Diffstat (limited to 'fixincludes/tests/base/pthread.h')
-rw-r--r-- | fixincludes/tests/base/pthread.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h index b1c4d51..e75a6ee 100644 --- a/fixincludes/tests/base/pthread.h +++ b/fixincludes/tests/base/pthread.h @@ -59,6 +59,23 @@ #if defined( GLIBC_MUTEX_INIT_CHECK ) #define PTHREAD_MUTEX_INITIALIZER \ { { 0, 0, 0, 0, 0, 0 } } +#ifdef __USE_GNU +# if __WORDSIZE == 64 +# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0 } } +# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0 } } +# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0 } } +# else +# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0 } } +# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, 0 } } +# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, 0 } } +# endif +#endif # if __WORDSIZE == 64 # define PTHREAD_RWLOCK_INITIALIZER \ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } @@ -66,6 +83,16 @@ # define PTHREAD_RWLOCK_INITIALIZER \ { { 0, 0, 0, 0, 0, 0, 0, 0 } } # endif +# ifdef __USE_GNU +# if __WORDSIZE == 64 +# 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, 0 } } +# endif +# endif #define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } } #endif /* GLIBC_MUTEX_INIT_CHECK */ |