diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | nptl/ChangeLog | 10 | ||||
-rw-r--r-- | nptl/pthread_mutexattr_getpshared.c | 2 | ||||
-rw-r--r-- | nptl/pthread_mutexattr_gettype.c | 2 | ||||
-rw-r--r-- | nptl/pthread_mutexattr_init.c | 2 | ||||
-rw-r--r-- | nptl/pthread_mutexattr_setpshared.c | 2 | ||||
-rw-r--r-- | nptl/pthread_mutexattr_settype.c | 2 | ||||
-rw-r--r-- | sysdeps/ia64/backtrace.c | 9 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/backtrace.c | 9 | ||||
-rw-r--r-- | sysdeps/s390/s390-64/backtrace.c | 9 |
10 files changed, 51 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog index 674a172a61..83eca9c1b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-06-08 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/s390/s390-32/backtrace.c (init): Guard with #ifdef SHARED. + (unwind_backtrace, unwind_getip): Define #ifndef SHARED. + (__backtrace): Don't call init #ifndef SHARED. + * sysdeps/s390/s390-64/backtrace.c (init): Guard with #ifdef SHARED. + (unwind_backtrace, unwind_getip): Define #ifndef SHARED. + (__backtrace): Don't call init #ifndef SHARED. + * sysdeps/ia64/backtrace.c (init): Guard with #ifdef SHARED. + (unwind_backtrace, unwind_getip): Define #ifndef SHARED. + (__backtrace): Don't call init #ifndef SHARED. + 2004-06-11 Roland McGrath <roland@redhat.com> * sysdeps/arm/strlen.S [__ARMEB__]: Compute correctly for big-endian. diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 01de11fa82..d86f449623 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,13 @@ +2004-06-08 Jakub Jelinek <jakub@redhat.com> + + * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix + comment typo. + * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise. + * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise. + * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise. + * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared): + Likewise. Reported by Bob Cook <bobcook47@hotmail.com>. + 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap): diff --git a/nptl/pthread_mutexattr_getpshared.c b/nptl/pthread_mutexattr_getpshared.c index 1769463d63..4bd4ea18db 100644 --- a/nptl/pthread_mutexattr_getpshared.c +++ b/nptl/pthread_mutexattr_getpshared.c @@ -29,7 +29,7 @@ pthread_mutexattr_getpshared (attr, pshared) iattr = (const struct pthread_mutexattr *) attr; - /* We use bit 31 to single whether the mutex is going to be + /* We use bit 31 to signal whether the mutex is going to be process-shared or not. */ *pshared = ((iattr->mutexkind & 0x80000000) != 0 ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE); diff --git a/nptl/pthread_mutexattr_gettype.c b/nptl/pthread_mutexattr_gettype.c index 82a938db6a..5c32b2c6f1 100644 --- a/nptl/pthread_mutexattr_gettype.c +++ b/nptl/pthread_mutexattr_gettype.c @@ -29,7 +29,7 @@ pthread_mutexattr_gettype (attr, kind) iattr = (const struct pthread_mutexattr *) attr; - /* We use bit 31 to single whether the mutex is going to be + /* We use bit 31 to signal whether the mutex is going to be process-shared or not. */ *kind = iattr->mutexkind & ~0x80000000; diff --git a/nptl/pthread_mutexattr_init.c b/nptl/pthread_mutexattr_init.c index 3270d5346e..ee026c654e 100644 --- a/nptl/pthread_mutexattr_init.c +++ b/nptl/pthread_mutexattr_init.c @@ -28,7 +28,7 @@ __pthread_mutexattr_init (attr) if (sizeof (struct pthread_mutexattr) != sizeof (pthread_mutexattr_t)) memset (attr, '\0', sizeof (*attr)); - /* We use bit 31 to single whether the mutex is going to be + /* We use bit 31 to signal whether the mutex is going to be process-shared or not. By default it is zero, i.e., the mutex is not process-shared. */ ((struct pthread_mutexattr *) attr)->mutexkind = PTHREAD_MUTEX_NORMAL; diff --git a/nptl/pthread_mutexattr_setpshared.c b/nptl/pthread_mutexattr_setpshared.c index 9bc5c26700..5f2cf417e3 100644 --- a/nptl/pthread_mutexattr_setpshared.c +++ b/nptl/pthread_mutexattr_setpshared.c @@ -34,7 +34,7 @@ pthread_mutexattr_setpshared (attr, pshared) iattr = (struct pthread_mutexattr *) attr; - /* We use bit 31 to single whether the mutex is going to be + /* We use bit 31 to signal whether the mutex is going to be process-shared or not. */ if (pshared == PTHREAD_PROCESS_PRIVATE) iattr->mutexkind &= ~0x80000000; diff --git a/nptl/pthread_mutexattr_settype.c b/nptl/pthread_mutexattr_settype.c index 54021b37c6..c77fe79df5 100644 --- a/nptl/pthread_mutexattr_settype.c +++ b/nptl/pthread_mutexattr_settype.c @@ -33,7 +33,7 @@ __pthread_mutexattr_settype (attr, kind) iattr = (struct pthread_mutexattr *) attr; - /* We use bit 31 to single whether the mutex is going to be + /* We use bit 31 to signal whether the mutex is going to be process-shared or not. */ iattr->mutexkind = (iattr->mutexkind & 0x80000000) | kind; diff --git a/sysdeps/ia64/backtrace.c b/sysdeps/ia64/backtrace.c index d9daf0f54a..efacccce15 100644 --- a/sysdeps/ia64/backtrace.c +++ b/sysdeps/ia64/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -30,6 +30,7 @@ struct trace_arg int cnt, size; }; +#ifdef SHARED static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *); @@ -46,6 +47,10 @@ init (void) if (unwind_getip == NULL) unwind_backtrace = NULL; } +#else +# define unwind_backtrace _Unwind_Backtrace +# define unwind_getip _Unwind_GetIP +#endif static _Unwind_Reason_Code backtrace_helper (struct _Unwind_Context *ctx, void *a) @@ -67,11 +72,13 @@ __backtrace (array, size) int size; { struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; +#ifdef SHARED __libc_once_define (static, once); __libc_once (once, init); if (unwind_backtrace == NULL) return 0; +#endif if (size >= 1) unwind_backtrace (backtrace_helper, &arg); diff --git a/sysdeps/s390/s390-32/backtrace.c b/sysdeps/s390/s390-32/backtrace.c index c52750cecf..7a632572b5 100644 --- a/sysdeps/s390/s390-32/backtrace.c +++ b/sysdeps/s390/s390-32/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. - Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -61,6 +61,7 @@ struct trace_arg int cnt, size; }; +#ifdef SHARED static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *); @@ -77,6 +78,10 @@ init (void) if (unwind_getip == NULL) unwind_backtrace = NULL; } +#else +# define unwind_backtrace _Unwind_Backtrace +# define unwind_getip _Unwind_GetIP +#endif static int __backchain_backtrace (void **array, int size) @@ -122,9 +127,11 @@ int __backtrace (void **array, int size) { struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; +#ifdef SHARED __libc_once_define (static, once); __libc_once (once, init); +#endif if (unwind_backtrace == NULL) return __backchain_backtrace (array, size); diff --git a/sysdeps/s390/s390-64/backtrace.c b/sysdeps/s390/s390-64/backtrace.c index 8efdc6c0ac..05321349ca 100644 --- a/sysdeps/s390/s390-64/backtrace.c +++ b/sysdeps/s390/s390-64/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. 64 bit S/390 version. - Copyright (C) 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -60,6 +60,7 @@ struct trace_arg int cnt, size; }; +#ifdef SHARED static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *); @@ -76,6 +77,10 @@ init (void) if (unwind_getip == NULL) unwind_backtrace = NULL; } +#else +# define unwind_backtrace _Unwind_Backtrace +# define unwind_getip _Unwind_GetIP +#endif int __backchain_backtrace (void **array, int size) @@ -121,9 +126,11 @@ int __backtrace (void **array, int size) { struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; +#ifdef SHARED __libc_once_define (static, once); __libc_once (once, init); +#endif if (unwind_backtrace == NULL) return __backchain_backtrace (array, size); |