diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-09-07 09:04:06 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-09-07 09:04:06 +0000 |
commit | bdae5218097f2181710cf9058248e4c549c6ec84 (patch) | |
tree | 9d4008aa1d1cbfffbbd2e7525fc0c2630a44cb16 /nptl/sysdeps | |
parent | fcaea48fef6d82c56461654248e97d0816431d2e (diff) |
Updated to fedora-glibc-20060907T0853
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/pthread/aio_misc.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/createthread.c | 3 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/gai_misc.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 14 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h | 14 |
5 files changed, 12 insertions, 23 deletions
diff --git a/nptl/sysdeps/pthread/aio_misc.h b/nptl/sysdeps/pthread/aio_misc.h index f285083883..c5a11f4550 100644 --- a/nptl/sysdeps/pthread/aio_misc.h +++ b/nptl/sysdeps/pthread/aio_misc.h @@ -29,7 +29,7 @@ #define AIO_MISC_NOTIFY(waitlist) \ do { \ - if (--*waitlist->counterp == 0) \ + if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \ lll_futex_wake (waitlist->counterp, 1); \ } while (0) diff --git a/nptl/sysdeps/pthread/createthread.c b/nptl/sysdeps/pthread/createthread.c index 03a0f1aa37..88658a16e1 100644 --- a/nptl/sysdeps/pthread/createthread.c +++ b/nptl/sysdeps/pthread/createthread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -242,6 +242,7 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr, || (attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0)) stopped = true; pd->stopped_start = stopped; + pd->parent_cancelhandling = THREAD_GETMEM (THREAD_SELF, cancelhandling); /* Actually create the thread. */ int res = do_clone (pd, attr, clone_flags, start_thread, diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h index 1dc351a2de..9f6a73dad1 100644 --- a/nptl/sysdeps/pthread/gai_misc.h +++ b/nptl/sysdeps/pthread/gai_misc.h @@ -30,7 +30,7 @@ #define GAI_MISC_NOTIFY(waitlist) \ do { \ - if (--*waitlist->counterp == 0) \ + if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \ lll_futex_wake (waitlist->counterp, 1); \ } while (0) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index 64088ef732..21de09fe91 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -68,8 +68,7 @@ #define BUSY_WAIT_NOP asm ("rep; nop") -#ifdef USE_CFA_VAL_EXPRESSION -# define LLL_STUB_UNWIND_INFO_START \ +#define LLL_STUB_UNWIND_INFO_START \ ".section .eh_frame,\"a\",@progbits\n" \ "5:\t" ".long 7f-6f # Length of Common Information Entry\n" \ "6:\t" ".long 0x0 # CIE Identifier Tag\n\t" \ @@ -94,7 +93,7 @@ ".uleb128 10f-9f\n" \ "9:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ ".sleb128 3b-1b\n" -# define LLL_STUB_UNWIND_INFO_END \ +#define LLL_STUB_UNWIND_INFO_END \ ".byte 0x16 # DW_CFA_val_expression\n\t" \ ".uleb128 0x8\n\t" \ ".uleb128 12f-11f\n" \ @@ -121,7 +120,7 @@ 3: jmp 18f 4: snippet. */ -# define LLL_STUB_UNWIND_INFO_3 \ +#define LLL_STUB_UNWIND_INFO_3 \ LLL_STUB_UNWIND_INFO_START \ "10:\t" ".byte 0x40 + (2b-1b) # DW_CFA_advance_loc\n\t" \ LLL_STUB_UNWIND_INFO_END @@ -133,7 +132,7 @@ LLL_STUB_UNWIND_INFO_END 3: jmp 18f 4: snippet. */ -# define LLL_STUB_UNWIND_INFO_4 \ +#define LLL_STUB_UNWIND_INFO_4 \ LLL_STUB_UNWIND_INFO_START \ "10:\t" ".byte 0x40 + (0b-1b) # DW_CFA_advance_loc\n\t" \ ".byte 0x16 # DW_CFA_val_expression\n\t" \ @@ -144,11 +143,6 @@ LLL_STUB_UNWIND_INFO_START \ "20:\t" ".byte 0x40 + (2b-0b) # DW_CFA_advance_loc\n\t" \ LLL_STUB_UNWIND_INFO_END -#else -# define LLL_STUB_UNWIND_INFO_3 -# define LLL_STUB_UNWIND_INFO_4 -#endif - #define lll_futex_wait(futex, val) \ ({ \ diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h index 7da2f12231..97085bf018 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h @@ -49,8 +49,7 @@ #define BUSY_WAIT_NOP asm ("rep; nop") -#ifdef USE_CFA_VAL_EXPRESSION -# define LLL_STUB_UNWIND_INFO_START \ +#define LLL_STUB_UNWIND_INFO_START \ ".section .eh_frame,\"a\",@progbits\n" \ "7:\t" ".long 9f-8f # Length of Common Information Entry\n" \ "8:\t" ".long 0x0 # CIE Identifier Tag\n\t" \ @@ -75,7 +74,7 @@ ".uleb128 12f-11f\n" \ "11:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ ".sleb128 4b-1b\n" -# define LLL_STUB_UNWIND_INFO_END \ +#define LLL_STUB_UNWIND_INFO_END \ ".byte 0x16 # DW_CFA_val_expression\n\t" \ ".uleb128 0x10\n\t" \ ".uleb128 14f-13f\n" \ @@ -122,7 +121,7 @@ 5: jmp 24f 6: snippet. */ -# define LLL_STUB_UNWIND_INFO_5 \ +#define LLL_STUB_UNWIND_INFO_5 \ LLL_STUB_UNWIND_INFO_START \ "12:\t" ".byte 0x40 + (2b-1b) # DW_CFA_advance_loc\n\t" \ LLL_STUB_UNWIND_INFO_END @@ -136,7 +135,7 @@ LLL_STUB_UNWIND_INFO_END 5: jmp 24f 6: snippet. */ -# define LLL_STUB_UNWIND_INFO_6 \ +#define LLL_STUB_UNWIND_INFO_6 \ LLL_STUB_UNWIND_INFO_START \ "12:\t" ".byte 0x40 + (0b-1b) # DW_CFA_advance_loc\n\t" \ ".byte 0x16 # DW_CFA_val_expression\n\t" \ @@ -147,11 +146,6 @@ LLL_STUB_UNWIND_INFO_START \ "26:\t" ".byte 0x40 + (2b-0b) # DW_CFA_advance_loc\n\t" \ LLL_STUB_UNWIND_INFO_END -#else -# define LLL_STUB_UNWIND_INFO_5 -# define LLL_STUB_UNWIND_INFO_6 -#endif - #define lll_futex_wait(futex, val) \ ({ \ |