about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-01 04:09:55 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-01 04:09:55 +0000
commit31195be25b5cd8e88426ab2496eaeb4d508b0764 (patch)
tree22bb5835c3288f2530c8699a78855b050e1c47f7
parent06e2e0a747504a9cce34fa851e7afac2dc8efe42 (diff)
downloadglibc-31195be25b5cd8e88426ab2496eaeb4d508b0764.tar.gz
glibc-31195be25b5cd8e88426ab2496eaeb4d508b0764.tar.xz
glibc-31195be25b5cd8e88426ab2496eaeb4d508b0764.zip
Update.
2003-05-31  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h (SA_NOCLDWAIT): Define.
-rw-r--r--ChangeLog4
-rw-r--r--nptl/ChangeLog13
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevellock.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_timedwait.c2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/sigaction.h3
9 files changed, 26 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index b2dcf9af6c..3ca7aa9dd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-05-31  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h (SA_NOCLDWAIT): Define.
+
 2003-05-31  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_plt_conflict):
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index dc78ad8ed4..cc9c94d0c4 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,18 @@
 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
+	Also fail if tv_nsec < 0.
+	(__lll_timedwait_tid): Likewise.
+	* sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
+	* sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
+	Likewise.
+	* sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
+	Likewise.
+	* sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
+	Likewise.
+	* sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
+	Likewise.
+
 	* Makefile (tests): Add tst-sem8 and tst-sem9.
 	* tst-sem8.c: New file.
 	* tst-sem9.c: New file.
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
index 8923afbfed..bd3fe4c012 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
@@ -337,7 +337,7 @@ extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
     int __result = 0;							      \
     if (tid != 0)							      \
       {									      \
-	if (abstime == NULL || abstime->tv_nsec >= 1000000000)		      \
+	if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)	      \
 	  __result = EINVAL;						      \
 	else								      \
 	  __result = __lll_timedwait_tid (&tid, abstime);		      \
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index eb3e689b9e..ad7510abfe 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -44,7 +44,7 @@ int
 __lll_timedlock_wait (int *futex, int val, const struct timespec *abstime)
 {
   /* Reject invalid timeouts.  */
-  if (abstime->tv_nsec >= 1000000000)
+  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
     return EINVAL;
 
   do
@@ -100,7 +100,7 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
 {
   int tid;
 
-  if (abstime->tv_nsec >= 1000000000)
+  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
     return EINVAL;
 
   /* Repeat until thread terminated.  */
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c
index 60c39d01b5..6fedd2ef0a 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c
@@ -64,7 +64,7 @@ ___lll_timedwait_tid (ptid, abstime)
 {
   int tid;
 
-  if (abstime == NULL || abstime->tv_nsec >= 1000000000)
+  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
     return EINVAL;
 
   /* Repeat until thread terminated.  */
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c b/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c
index d4d91db5ce..380091c565 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c
+++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c
@@ -48,7 +48,7 @@ ___lll_mutex_timedlock (futex, abstime, newval)
      int newval;
 {
   /* Reject invalid timeouts.  */
-  if (abstime->tv_nsec >= 1000000000)
+  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
     return EINVAL;
 
   int oldval;
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c
index 42433dec74..273b54164a 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c
@@ -43,7 +43,7 @@ sem_timedwait (sem, abstime)
 	return 0;
 
       /* Check for invalid timeout values.  */
-      if (abstime->tv_nsec >= 1000000000)
+      if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
 	{
 	  __set_errno (EINVAL);
 	  return -1;
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
index 632cce4391..8a65ce2567 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
@@ -42,7 +42,7 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
     }
 
   err = -EINVAL;
-  if (abstime->tv_nsec >= 1000000000)
+  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
     goto error_return;
 
   do
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
index c34fcc4037..11599d5208 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
@@ -1,5 +1,5 @@
 /* Definitions for Linux/ia64 sigaction.
-   Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000, 2003 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
@@ -49,6 +49,7 @@ struct sigaction
 
 /* Bits in `sa_flags'.  */
 #define SA_NOCLDSTOP  0x00000001 /* Don't send SIGCHLD when children stop.  */
+#define SA_NOCLDWAIT  0x00000002 /* Don't create zombie on child death.  */
 #define SA_SIGINFO    0x00000004
 #if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK   0x08000000 /* Use signal stack by using `sa_restorer'. */