diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-12-27 14:48:14 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-12-27 14:48:14 +0000 |
commit | 64cd3e83c9993f3c1a3c24ea3030a22ccf35e12d (patch) | |
tree | 8808fad08bb8677b0e0d2158c65096eae5484767 /nptl/sysdeps/pthread | |
parent | e3173d2c996d8e30dfe44e9bf530881da6df6aaa (diff) |
Updated to fedora-glibc-20051227T1426
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r-- | nptl/sysdeps/pthread/pthread.h | 53 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/sigaction.c | 8 |
2 files changed, 48 insertions, 13 deletions
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h index badadae169..5413661eb3 100644 --- a/nptl/sysdeps/pthread/pthread.h +++ b/nptl/sysdeps/pthread/pthread.h @@ -60,24 +60,39 @@ enum #endif }; -/* Mutex initializers. */ -#define PTHREAD_MUTEX_INITIALIZER \ - { { 0, 0, 0, 0, 0, 0 } } + #ifdef __USE_GNU -# if __WORDSIZE == 64 +/* Robust mutex or not flags. */ +enum +{ + PTHREAD_MUTEX_STALLED_NP, + PTHREAD_MUTEX_ROBUST_NP +}; +#endif + + +/* Mutex initializers. */ +#if __WORDSIZE == 64 +# define PTHREAD_MUTEX_INITIALIZER \ + { { 0, 0, 0, 0, 0, 0, (void *) 0, (void *) 0 } } +# ifdef __USE_GNU # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0 } } + { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, (void *) 0, (void *) 0 } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0 } } + { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, (void *) 0, (void *) 0 } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0 } } -# else + { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, (void *) 0, (void *) 0 } } +# endif +#else +# define PTHREAD_MUTEX_INITIALIZER \ + { { 0, 0, 0, 0, 0, { 0 } } } +# ifdef __USE_GNU # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0 } } + { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, 0 } } + { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0 } } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, 0 } } + { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0 } } } # endif #endif @@ -696,6 +711,12 @@ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW; +#ifdef __USE_GNU +/* Declare the state protected by MUTEX as consistent. */ +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __THROW; +#endif + + /* Functions for handling mutex attributes. */ /* Initialize mutex attribute object ATTR with default attributes @@ -726,6 +747,16 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __THROW; #endif +#ifdef __USE_GNU +/* Get the robustness flag of the mutex attribute ATTR. */ +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) __THROW; + +/* Set the robustness flag of the mutex attribute ATTR. */ +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) __THROW; +#endif + #if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Functions for handling read-write locks. */ diff --git a/nptl/sysdeps/pthread/sigaction.c b/nptl/sysdeps/pthread/sigaction.c index 4d36150a90..445a2cb36f 100644 --- a/nptl/sysdeps/pthread/sigaction.c +++ b/nptl/sysdeps/pthread/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -28,7 +28,11 @@ SIGCANCEL or SIGTIMER to be handled. */ # define LIBC_SIGACTION 1 -# include <nptl/sysdeps/pthread/sigaction.c> +/* Note this include must be one that isn't found using a -I directory such + as -I. or -I.. for using an explicit <sysdeps/...> path, because that + would reset the search path starting position for the #include_next + below, to after that -I directory, and skip the search we want to do. */ +# include "sigaction.c" int __sigaction (sig, act, oact) |