about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-09-29 08:48:32 +0000
committerJakub Jelinek <jakub@redhat.com>2004-09-29 08:48:32 +0000
commit2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16 (patch)
tree4d407d9cf3aaa05d597017bf8c326fda4e960f66 /nptl
parentf1750fb9c68854778e6e023ed490ff80e1c90167 (diff)
downloadglibc-2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16.tar.gz
glibc-2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16.tar.xz
glibc-2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16.zip
Updated to fedora-glibc-20040929T0821
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog19
-rw-r--r--nptl/sysdeps/pthread/pthread_sigmask.c10
-rw-r--r--nptl/sysdeps/pthread/sigaction.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pthread_kill.c7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h8
12 files changed, 62 insertions, 40 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 2aff8c8dbb..aba6fc4661 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,22 @@
+2004-09-28  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
+	allow SIGSETXID to be sent.
+	* sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
+	for SIGSETXID to be defined.
+	* sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
+	SIGSETXID cannot be blocked.
+
+	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
+	Add __extension__ to long long types.
+	* sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
+
 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
 
 	* descr.h (struct pthread): Add stopped_start field.
diff --git a/nptl/sysdeps/pthread/pthread_sigmask.c b/nptl/sysdeps/pthread/pthread_sigmask.c
index efe186ac2c..0d12fe6bf0 100644
--- a/nptl/sysdeps/pthread/pthread_sigmask.c
+++ b/nptl/sysdeps/pthread/pthread_sigmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -31,13 +31,15 @@ pthread_sigmask (how, newmask, oldmask)
 {
   sigset_t local_newmask;
 
-  /* The only thing we have to make sure here is that SIGCANCEL is not
-     blocked.  */
+  /* The only thing we have to make sure here is that SIGCANCEL and
+     SIGSETXID is not blocked.  */
   if (newmask != NULL
-      && __builtin_expect (__sigismember (newmask, SIGCANCEL), 0))
+      && (__builtin_expect (__sigismember (newmask, SIGCANCEL), 0)
+	  || __builtin_expect (__sigismember (newmask, SIGSETXID), 0)))
     {
       local_newmask = *newmask;
       __sigdelset (&local_newmask, SIGCANCEL);
+      __sigdelset (&local_newmask, SIGSETXID);
       newmask = &local_newmask;
     }
 
diff --git a/nptl/sysdeps/pthread/sigaction.c b/nptl/sysdeps/pthread/sigaction.c
index 392cb65c90..4d36150a90 100644
--- a/nptl/sysdeps/pthread/sigaction.c
+++ b/nptl/sysdeps/pthread/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -36,7 +36,7 @@ __sigaction (sig, act, oact)
      const struct sigaction *act;
      struct sigaction *oact;
 {
-  if (sig == SIGCANCEL)
+  if (__builtin_expect (sig == SIGCANCEL || sig == SIGSETXID, 0))
     {
       __set_errno (EINVAL);
       return -1;
diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
index 79d43febdd..d13d6e86a4 100644
--- a/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
@@ -77,15 +77,15 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     unsigned int __nwaiters;
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  long long int __align;
+  __extension__ long long int __align;
 } pthread_cond_t;
 
 typedef union
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
index 1db372d6a3..4d1c9450b5 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
@@ -77,15 +77,15 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     unsigned int __nwaiters;
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  long long int __align;
+  __extension__ long long int __align;
 } pthread_cond_t;
 
 typedef union
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
index 746138e420..afb8800ac9 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
@@ -77,9 +77,9 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     unsigned int __nwaiters;
     unsigned int __broadcast_seq;
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
index 2f8e1d9600..90c0695697 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
@@ -97,15 +97,15 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     unsigned int __nwaiters;
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  long long int __align;
+  __extension__ long long int __align;
 } pthread_cond_t;
 
 typedef union
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
index 87577be4dc..9115d6f40b 100644
--- a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
+++ b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -37,8 +37,9 @@ __pthread_kill (threadid, signo)
     /* Not a valid thread handle.  */
     return ESRCH;
 
-  /* Disallow sending the signal we use for cancellation.  */
-  if (signo == SIGCANCEL || signo == SIGTIMER)
+  /* Disallow sending the signal we use for cancellation, timers, for
+     for the setxid implementation.  */
+  if (signo == SIGCANCEL || signo == SIGTIMER || signo == SIGSETXID)
     return EINVAL;
 
   /* We have a special syscall to do the work.  */
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
index 9d7490444d..6b3618cd57 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
@@ -96,15 +96,15 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     unsigned int __nwaiters;
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  long long int __align;
+  __extension__ long long int __align;
 } pthread_cond_t;
 
 typedef union
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
index 914351a3e2..5125408dcb 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
@@ -78,15 +78,15 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     unsigned int __nwaiters;
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  long long int __align;
+  __extension__ long long int __align;
 } pthread_cond_t;
 
 typedef union
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
index c894f12495..3c5a289445 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
@@ -97,15 +97,15 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     unsigned int __nwaiters;
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  long long int __align;
+  __extension__ long long int __align;
 } pthread_cond_t;
 
 typedef union
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
index 6b996a412a..03c2ef8106 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
@@ -96,15 +96,15 @@ typedef union
   {
     int __lock;
     unsigned int __futex;
-    unsigned long long int __total_seq;
-    unsigned long long int __wakeup_seq;
-    unsigned long long int __woken_seq;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
     void *__mutex;
     int __nwaiters;
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  long long int __align;
+  __extension__ long long int __align;
 } pthread_cond_t;
 
 typedef union