]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 2 Sep 2004 22:47:23 +0000 (22:47 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 2 Sep 2004 22:47:23 +0000 (22:47 +0000)
* sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
* sysdeps/i386/jmpbuf-unwind.h: Likewise
* sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
* sysdeps/s390/jmpbuf-unwind.h: Likewise.
* sysdeps/sh/jmpbuf-unwind.h: Likewise.
* sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
* sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
* unwind.c: Use it.

12 files changed:
nptl/ChangeLog
nptl/sysdeps/alpha/jmpbuf-unwind.h
nptl/sysdeps/i386/jmpbuf-unwind.h
nptl/sysdeps/powerpc/jmpbuf-unwind.h
nptl/sysdeps/pthread/pthread_cond_timedwait.c
nptl/sysdeps/s390/jmpbuf-unwind.h
nptl/sysdeps/sh/jmpbuf-unwind.h
nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
nptl/sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
nptl/sysdeps/x86_64/jmpbuf-unwind.h
nptl/tst-cond20.c
nptl/unwind.c

index 6306a7b0c666cee40a4948e019d5dbfff47caaae..344e7fb69f874b5422ead7f394b6afcd436bc2f9 100644 (file)
@@ -1,5 +1,15 @@
 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
+       * sysdeps/i386/jmpbuf-unwind.h: Likewise
+       * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
+       * sysdeps/s390/jmpbuf-unwind.h: Likewise.
+       * sysdeps/sh/jmpbuf-unwind.h: Likewise.
+       * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
+       * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
+       * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
+       * unwind.c: Use it.
+
        * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
        Rename __data.__clock to __data.__nwaiters, make it unsigned int.
        * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
index ad77816ca09b6a00a302ec777e33f5a9b4844369..5cef8b1cf54d23987f6a80381fa9228cd4075fc5 100644 (file)
@@ -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.
 
@@ -26,3 +26,6 @@
 
 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
   ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index ad77816ca09b6a00a302ec777e33f5a9b4844369..5cef8b1cf54d23987f6a80381fa9228cd4075fc5 100644 (file)
@@ -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.
 
@@ -26,3 +26,6 @@
 
 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
   ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index dc8bebf99cff874bbdae7e372363018345dd8335..0b817160d36508b41c7d13777b75f300838eb825 100644 (file)
@@ -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.
 
@@ -26,3 +26,6 @@
 
 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
   ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index c6606c9bf946c13e469d640ed0a683f1e7ec350d..fdbf43eae8236fb7379e35ed70f2ca6603bcd6e0 100644 (file)
@@ -99,7 +99,8 @@ __pthread_cond_timedwait (cond, mutex, abstime)
        INTERNAL_SYSCALL_DECL (err);
        int ret;
        ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
-                               cond->__data.__nwaiters & COND_CLOCK_BITS,
+                               (cond->__data.__nwaiters
+                                & ((1 << COND_CLOCK_BITS) - 1)),
                                &rt);
 # ifndef __ASSUME_POSIX_TIMERS
        if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
index 409408f5d2d80ce20ffb62873dec21bd928758a7..19d0729a947add412367f5df3035b24c7edf2072 100644 (file)
@@ -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.
 
@@ -27,3 +27,6 @@
 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj)    \
   ((uintptr_t) (_address) - (_adj)                      \
    < (uintptr_t) (_jmpbuf)->__gregs[__JB_GPR15] - (_adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index 7e36d830c05a575d5e5ff6fab985525b5989b254..cf6d25f04145c8a150a5d158507cfd471d83cd29 100644 (file)
@@ -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.
 
@@ -26,3 +26,6 @@
 
 #define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
   ((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index ad77816ca09b6a00a302ec777e33f5a9b4844369..5cef8b1cf54d23987f6a80381fa9228cd4075fc5 100644 (file)
@@ -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.
 
@@ -26,3 +26,6 @@
 
 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
   ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index 90b5764e81e58bf78c0bf0d6c86748933581e34d..b821ab00f2ecd58c8163823efd3217412e6960b9 100644 (file)
@@ -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.
 
@@ -31,3 +31,6 @@
 
 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
   ((uintptr_t)(_address) - (_adj) < (uintptr_t)(((long *)_jmpbuf)[0]) - (_adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index f0a22e7d9c380826bcfafa360cdfef13c48f006d..345ed557c5e2fab685b45d7a7311f7814c3d6296 100644 (file)
@@ -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.
 
@@ -26,3 +26,6 @@
 
 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
   ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_RSP] - (_adj))
+
+/* We use the normal lobngjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
index ba50d58534ad18597f6ae7a68eb3525f7624bdbd..18918f32e6090ec8e6a767b97c53d70ec65e4554 100644 (file)
@@ -46,7 +46,7 @@ tf (void *p)
       struct timeval tv;
       gettimeofday (&tv, NULL);
       struct timespec ts;
-      /* Wait three second.  */
+      /* Wait three seconds.  */
       ts.tv_sec = tv.tv_sec + 3;
       ts.tv_nsec = tv.tv_usec * 1000;
       pthread_cond_timedwait (&cond, &mut, &ts);
index f72c33891d3ae5ce7bded1566557863f47a55ba6..56a423815837da9a5e7fe5ffc3efe962ac6f7fa1 100644 (file)
@@ -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 Ulrich Drepper <drepper@redhat.com>
    and Richard Henderson <rth@redhat.com>, 2003.
@@ -47,7 +47,7 @@ unwind_stop (int version, _Unwind_Action actions,
   struct pthread *self = THREAD_SELF;
   struct _pthread_cleanup_buffer *curp = THREAD_GETMEM (self, cleanup);
   int do_longjump = 0;
-  
+
   /* Adjust all pointers used in comparisons, so that top of thread's
      stack is at the top of address space.  Without that, things break
      if stack is allocated above the main stack.  */
@@ -93,7 +93,7 @@ unwind_stop (int version, _Unwind_Action actions,
     }
 
   if (do_longjump)
-    __libc_longjmp ((struct __jmp_buf_tag *) buf->cancel_jmp_buf, 1);
+    __libc_unwind_longjmp ((struct __jmp_buf_tag *) buf->cancel_jmp_buf, 1);
 
   return _URC_NO_REASON;
 }
@@ -155,7 +155,7 @@ __pthread_unwind (__pthread_unwind_buf_t *buf)
     }
 
   /* We simply jump to the registered setjmp buffer.  */
-  __libc_longjmp ((struct __jmp_buf_tag *) ibuf->cancel_jmp_buf, 1);
+  __libc_unwind_longjmp ((struct __jmp_buf_tag *) ibuf->cancel_jmp_buf, 1);
 #endif
   /* NOTREACHED */