diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-09-08 06:31:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-09-08 06:31:04 +0000 |
commit | 67254a97d98f73a35ab995e8afccb3ded433c8b1 (patch) | |
tree | 456774aa415e12a4d77d585348a2c12e96f76e14 | |
parent | 7ba0e52c39ae2a57933a856ce363ab0361ad1ed9 (diff) | |
download | glibc-67254a97d98f73a35ab995e8afccb3ded433c8b1.tar.gz glibc-67254a97d98f73a35ab995e8afccb3ded433c8b1.tar.xz glibc-67254a97d98f73a35ab995e8afccb3ded433c8b1.zip |
Update.
* malloc/malloc.h: Don't define __THROW if it is already defined.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | malloc/malloc.h | 12 | ||||
-rw-r--r-- | nptl/ChangeLog | 17 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c | 4 |
7 files changed, 34 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog index 94a848796f..703e89b683 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-09-07 Ulrich Drepper <drepper@redhat.com> + * malloc/malloc.h: Don't define __THROW if it is already defined. + * sysdeps/powerpc/bits/atomic.h (atomic_increment): Define. (atomic_decrement): Define. diff --git a/malloc/malloc.h b/malloc/malloc.h index ff8194f389..753539e7b0 100644 --- a/malloc/malloc.h +++ b/malloc/malloc.h @@ -1,5 +1,5 @@ /* Prototypes and definition for malloc implementation. - Copyright (C) 1996,1997,1999,2000,2002,2003 Free Software Foundation, Inc. + Copyright (C) 1996,97,99,2000,2002,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -66,10 +66,12 @@ /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with gcc 2.8.x and egcs. */ -# if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8) -# define __THROW throw () -# else -# define __THROW +# ifndef __THROW +# if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8) +# define __THROW throw () +# else +# define __THROW +# endif # endif # define __MALLOC_P(args) args __THROW /* This macro will be used for functions which might take C++ callback diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 0530809ed3..6857273d9c 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,22 @@ 2004-09-07 Ulrich Drepper <drepper@redhat.com> + * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once): + Use atomic_increment instead of atomic_exchange_and_add. + * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once): + Likewise. + * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once): + Likewise. + * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once): + Likewise. + + * allocatestack.c (allocate_stack): Use atomic_increment_val + instead of atomic_exchange_and_add. + * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise. + * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post): + Likewise. + * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait): + Likewise. + * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since the initialization function might throw. diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c index 82f72de8b3..79a3c47aed 100644 --- a/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c +++ b/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -85,7 +85,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) pthread_cleanup_pop (0); /* Add one to *once_control to take the bottom 2 bits from 01 to 10. */ - atomic_exchange_and_add (once_control, 1); + atomic_increment (once_control); /* Wake up all other threads. */ lll_futex_wake (once_control, INT_MAX); diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c index 16f1279f8d..3b07cc127d 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c +++ b/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c @@ -1,4 +1,4 @@ -/* 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. @@ -81,7 +81,7 @@ __pthread_once (once_control, init_routine) /* Add one to *once_control. */ - atomic_exchange_and_add (once_control, 1); + atomic_increment (once_control); /* Wake up all other threads. */ lll_futex_wake (once_control, INT_MAX); diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c index ea46cc9023..e1afff8a38 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c @@ -1,4 +1,4 @@ -/* 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 Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -89,7 +89,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) /* Add one to *once_control to take the bottom 2 bits from 01 to 10. */ - atomic_exchange_and_add (once_control, 1); + atomic_increment (once_control); /* Wake up all other threads. */ lll_futex_wake (once_control, INT_MAX); diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c index 16f1279f8d..3b07cc127d 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c @@ -1,4 +1,4 @@ -/* 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. @@ -81,7 +81,7 @@ __pthread_once (once_control, init_routine) /* Add one to *once_control. */ - atomic_exchange_and_add (once_control, 1); + atomic_increment (once_control); /* Wake up all other threads. */ lll_futex_wake (once_control, INT_MAX); |