Update.
* 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.
This commit is contained in:
parent
73f7c32c47
commit
f76c849910
|
@ -1,5 +1,15 @@
|
||||||
2004-09-02 Ulrich Drepper <drepper@redhat.com>
|
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):
|
* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
|
||||||
Rename __data.__clock to __data.__nwaiters, make it unsigned int.
|
Rename __data.__clock to __data.__nwaiters, make it unsigned int.
|
||||||
* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
|
* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -26,3 +26,6 @@
|
||||||
|
|
||||||
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
||||||
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_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)
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -26,3 +26,6 @@
|
||||||
|
|
||||||
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
||||||
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_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)
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -26,3 +26,6 @@
|
||||||
|
|
||||||
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
||||||
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_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)
|
||||||
|
|
|
@ -99,7 +99,8 @@ __pthread_cond_timedwait (cond, mutex, abstime)
|
||||||
INTERNAL_SYSCALL_DECL (err);
|
INTERNAL_SYSCALL_DECL (err);
|
||||||
int ret;
|
int ret;
|
||||||
ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
|
ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
|
||||||
cond->__data.__nwaiters & COND_CLOCK_BITS,
|
(cond->__data.__nwaiters
|
||||||
|
& ((1 << COND_CLOCK_BITS) - 1)),
|
||||||
&rt);
|
&rt);
|
||||||
# ifndef __ASSUME_POSIX_TIMERS
|
# ifndef __ASSUME_POSIX_TIMERS
|
||||||
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
|
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -27,3 +27,6 @@
|
||||||
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
||||||
((uintptr_t) (_address) - (_adj) \
|
((uintptr_t) (_address) - (_adj) \
|
||||||
< (uintptr_t) (_jmpbuf)->__gregs[__JB_GPR15] - (_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)
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -26,3 +26,6 @@
|
||||||
|
|
||||||
#define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
|
#define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
|
||||||
((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (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)
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -26,3 +26,6 @@
|
||||||
|
|
||||||
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
||||||
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_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)
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -31,3 +31,6 @@
|
||||||
|
|
||||||
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
||||||
((uintptr_t)(_address) - (_adj) < (uintptr_t)(((long *)_jmpbuf)[0]) - (_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)
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||||
|
|
||||||
|
@ -26,3 +26,6 @@
|
||||||
|
|
||||||
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
|
||||||
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_RSP] - (_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)
|
||||||
|
|
|
@ -46,7 +46,7 @@ tf (void *p)
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday (&tv, NULL);
|
gettimeofday (&tv, NULL);
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
/* Wait three second. */
|
/* Wait three seconds. */
|
||||||
ts.tv_sec = tv.tv_sec + 3;
|
ts.tv_sec = tv.tv_sec + 3;
|
||||||
ts.tv_nsec = tv.tv_usec * 1000;
|
ts.tv_nsec = tv.tv_usec * 1000;
|
||||||
pthread_cond_timedwait (&cond, &mut, &ts);
|
pthread_cond_timedwait (&cond, &mut, &ts);
|
||||||
|
|
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>
|
Contributed by Ulrich Drepper <drepper@redhat.com>
|
||||||
and Richard Henderson <rth@redhat.com>, 2003.
|
and Richard Henderson <rth@redhat.com>, 2003.
|
||||||
|
@ -93,7 +93,7 @@ unwind_stop (int version, _Unwind_Action actions,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_longjump)
|
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;
|
return _URC_NO_REASON;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ __pthread_unwind (__pthread_unwind_buf_t *buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We simply jump to the registered setjmp buffer. */
|
/* 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
|
#endif
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue