aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--NEWS4
-rw-r--r--misc/sys/cdefs.h7
-rw-r--r--nptl/ChangeLog7
-rw-r--r--nptl/semaphore.h6
-rw-r--r--nptl/sysdeps/pthread/pthread.h38
-rw-r--r--posix/unistd.h2
7 files changed, 45 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index cd1f9ad..8526a41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-27 Andreas Schwab <schwab@redhat.com>
+
+ [BZ #13344]
+ * misc/sys/cdefs.h (__THROWNL): Define.
+ * posix/unistd.h: Use __THREADNL instead of __THREAD
+ for memory synchronization functions.
+
2011-10-26 Roland McGrath <roland@hack.frob.com>
[BZ #13349]
diff --git a/NEWS b/NEWS
index e0bb0ef..6063060 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2011-10-20
+GNU C Library NEWS -- history of user-visible changes. 2011-10-27
Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -11,7 +11,7 @@ Version 2.15
6779, 6783, 9696, 11589, 12403, 12847, 12868, 12852, 12874, 12885, 12892,
12907, 12922, 12935, 13007, 13021, 13067, 13068, 13090, 13092, 13114,
- 13118, 13123, 13134, 13138, 13150, 13179, 13192, 13268, 13291
+ 13118, 13123, 13134, 13138, 13150, 13179, 13192, 13268, 13291, 13344
* New program pldd to list loaded object of a process
Implemented by Ulrich Drepper.
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 72073e8..16cf557 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -38,7 +38,8 @@
#ifdef __GNUC__
-/* All functions, except those with callbacks, are leaf functions. */
+/* All functions, except those with callbacks or those that
+ synchronize memory, are leaf functions. */
# if __GNUC_PREREQ (4, 6) && !defined _LIBC
# define __LEAF , __leaf__
# define __LEAF_ATTR __attribute__ ((__leaf__))
@@ -54,13 +55,16 @@
the -fexceptions options for C code as well. */
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
# define __THROW __attribute__ ((__nothrow__ __LEAF))
+# define __THROWNL __attribute__ ((__nothrow__))
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
# else
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
+# define __THROWNL throw ()
# define __NTH(fct) __LEAF_ATTR fct throw ()
# else
# define __THROW
+# define __THROWNL
# define __NTH(fct) fct
# endif
# endif
@@ -70,6 +74,7 @@
# define __inline /* No inline functions. */
# define __THROW
+# define __THROWNL
# define __NTH(fct) fct
# define __const const
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index f4b2f04..6b483d6 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-27 Andreas Schwab <schwab@redhat.com>
+
+ [BZ #13344]
+ * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
+ for memory synchronization functions.
+ * semaphore.h: Likewise.
+
2011-10-24 Ulrich Drepper <drepper@gmail.com>
* tst-cancel7.c: Avoid warning.
diff --git a/nptl/semaphore.h b/nptl/semaphore.h
index 4f13725..11caf66 100644
--- a/nptl/semaphore.h
+++ b/nptl/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2011 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
@@ -64,10 +64,10 @@ extern int sem_timedwait (sem_t *__restrict __sem,
#endif
/* Test whether SEM is posted. */
-extern int sem_trywait (sem_t *__sem) __THROW;
+extern int sem_trywait (sem_t *__sem) __THROWNL;
/* Post SEM. */
-extern int sem_post (sem_t *__sem) __THROW;
+extern int sem_post (sem_t *__sem) __THROWNL;
/* Get current value of SEM and store it in *SVAL. */
extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index 4c83665..a924281 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -225,7 +225,7 @@ __BEGIN_DECLS
extern int pthread_create (pthread_t *__restrict __newthread,
__const pthread_attr_t *__restrict __attr,
void *(*__start_routine) (void *),
- void *__restrict __arg) __THROW __nonnull ((1, 3));
+ void *__restrict __arg) __THROWNL __nonnull ((1, 3));
/* Terminate calling thread.
@@ -740,22 +740,22 @@ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
/* Try locking a mutex. */
extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Lock a mutex. */
extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
#ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
__const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
+ __abstime) __THROWNL __nonnull ((1, 2));
#endif
/* Unlock a mutex. */
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Get the priority ceiling of MUTEX. */
@@ -879,37 +879,37 @@ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
/* Acquire read lock for RWLOCK. */
extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Try to acquire read lock for RWLOCK. */
extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
# ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
+ __abstime) __THROWNL __nonnull ((1, 2));
# endif
/* Acquire write lock for RWLOCK. */
extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Try to acquire write lock for RWLOCK. */
extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
# ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
+ __abstime) __THROWNL __nonnull ((1, 2));
# endif
/* Unlock RWLOCK. */
extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Functions for handling read-write lock attributes. */
@@ -959,11 +959,11 @@ extern int pthread_cond_destroy (pthread_cond_t *__cond)
/* Wake up one thread waiting for condition variable COND. */
extern int pthread_cond_signal (pthread_cond_t *__cond)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Wake up all threads waiting for condition variables COND. */
extern int pthread_cond_broadcast (pthread_cond_t *__cond)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Wait for condition variable COND to be signaled or broadcast.
MUTEX is assumed to be locked before.
@@ -1034,15 +1034,15 @@ extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
/* Wait until spinlock LOCK is retrieved. */
extern int pthread_spin_lock (pthread_spinlock_t *__lock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Try to lock spinlock LOCK. */
extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Release spinlock LOCK. */
extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Functions to handle barriers. */
@@ -1060,7 +1060,7 @@ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
/* Wait on barrier BARRIER. */
extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Initialize barrier attribute ATTR. */
diff --git a/posix/unistd.h b/posix/unistd.h
index 9b41697..01fb64a 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -776,7 +776,7 @@ extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
/* Clone the calling process, creating an exact copy.
Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
-extern __pid_t fork (void) __THROW;
+extern __pid_t fork (void) __THROWNL;
#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
|| defined __USE_BSD