diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-05-30 04:45:03 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-05-30 04:45:03 +0000 |
commit | b03b0c292034392fbe98b96fd0b3b5cde6c1587c (patch) | |
tree | ce57a065a97e44527ce256444202ba4af8ed01e4 /nptl/sysdeps | |
parent | fc3f0ccb9884844acc1b15673dc17a190e0a2262 (diff) | |
download | glibc-b03b0c292034392fbe98b96fd0b3b5cde6c1587c.tar glibc-b03b0c292034392fbe98b96fd0b3b5cde6c1587c.tar.gz glibc-b03b0c292034392fbe98b96fd0b3b5cde6c1587c.tar.bz2 glibc-b03b0c292034392fbe98b96fd0b3b5cde6c1587c.zip |
* pthread_getattr_np.c: No need to install a cancellation handler,
this is no cancellation point.
* pthread_getschedparam.c: Likewise.
* pthread_setschedparam.c: Likewise.
* pthread_setschedprio.c: Likewise.
* sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
lll_unlock_wake_cb.
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S | 29 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 1 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/lowlevellock.c | 17 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S | 30 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h | 5 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c | 17 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S | 23 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h | 3 |
13 files changed, 11 insertions, 132 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h index 58b4806eb2..04ac006400 100644 --- a/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006, 2007 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 @@ -237,8 +237,6 @@ typedef int lll_lock_t; #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* The states of a lock are: 0 - untaken 1 - taken by one user diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S index 1c47b37bb0..cfcc7dafc4 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S @@ -219,35 +219,6 @@ __lll_mutex_timedlock_wait: #endif -#ifdef NOT_IN_libc - .globl lll_unlock_wake_cb - .type lll_unlock_wake_cb,@function - .hidden lll_unlock_wake_cb - .align 16 -lll_unlock_wake_cb: - pushl %ebx - pushl %ecx - pushl %edx - - movl 20(%esp), %ebx - LOCK - subl $1, (%ebx) - je 1f - - movl $FUTEX_WAKE, %ecx - movl $1, %edx /* Wake one thread. */ - movl $SYS_futex, %eax - movl $0, (%ebx) - ENTER_KERNEL - -1: popl %edx - popl %ecx - popl %ebx - ret - .size lll_unlock_wake_cb,.-lll_unlock_wake_cb -#endif - - .globl __lll_mutex_unlock_wake .type __lll_mutex_unlock_wake,@function .hidden __lll_mutex_unlock_wake diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index b89d5dd7d1..aa963f77e7 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -449,7 +449,6 @@ extern int __lll_lock_wait (int val, int *__futex) __attribute ((regparm (2))) attribute_hidden; extern int __lll_unlock_wake (int *__futex) __attribute ((regparm (1))) attribute_hidden; -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; /* The states of a lock are: diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h index 8df997a262..17093471d3 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -226,8 +226,6 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) /* Type for lock object. */ typedef int lll_lock_t; -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* Initializers for lock. */ #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c index 932e27300f..38d78884d4 100644 --- a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c +++ b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c @@ -1,5 +1,5 @@ /* low level locking for pthread library. Generic futex-using version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -76,21 +76,9 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime) } -/* These don't get included in libc.so */ +/* This function doesn't get included in libc.so */ #ifdef IS_IN_libpthread int -lll_unlock_wake_cb (int *futex) -{ - int val = atomic_exchange_rel (futex, 0); - - if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); - - return 0; -} - - -int __lll_timedwait_tid (int *tidp, const struct timespec *abstime) { int tid; @@ -127,5 +115,4 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime) return 0; } - #endif diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h index 71fede8384..20547f94f2 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h @@ -263,8 +263,6 @@ typedef int lll_lock_t; #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* The states of a lock are: 0 - untaken 1 - taken by one user diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h index 38d9f2ac41..d915facba1 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. @@ -321,8 +321,6 @@ typedef int lll_lock_t; #define lll_unlock(futex) lll_mutex_unlock (futex) #define lll_islocked(futex) lll_mutex_islocked (futex) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* The states of a lock are: 1 - untaken 0 - taken by one user diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S index ac3169889f..3b0b66d436 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2007 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 @@ -186,34 +186,6 @@ __lll_mutex_timedlock_wait: #endif -#ifdef NOT_IN_libc - .globl lll_unlock_wake_cb - .type lll_unlock_wake_cb,@function - .hidden lll_unlock_wake_cb - .align 5 - cfi_startproc -lll_unlock_wake_cb: - DEC (@r4, r2) - tst r2, r2 - bt 1f - - mov #FUTEX_WAKE, r5 - mov #1, r6 /* Wake one thread. */ - mov #0, r7 - mov.l r7, @r4 /* Stores 0. */ - mov #SYS_futex, r3 - extu.b r3, r3 - trapa #0x14 - SYSCALL_INST_PAD - -1: - rts - nop - cfi_endproc - .size lll_unlock_wake_cb,.-lll_unlock_wake_cb -#endif - - .globl __lll_mutex_unlock_wake .type __lll_mutex_unlock_wake,@function .hidden __lll_mutex_unlock_wake diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h index 0eb1f0114c..be8d403e26 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006, 2007 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 @@ -344,9 +344,6 @@ typedef int lll_lock_t; } while (0) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - - /* The states of a lock are: 0 - untaken 1 - taken by one user diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h index 5013922a2f..6548970663 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -240,8 +240,6 @@ __lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, /* Type for lock object. */ typedef int lll_lock_t; -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* Initializers for lock. */ #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c index a7611d6a88..cb9578b47b 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c @@ -1,5 +1,5 @@ /* low level locking for pthread library. SPARC version. - Copyright (C) 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -76,21 +76,9 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime) } -/* These don't get included in libc.so */ +/* This function doesn't get included in libc.so */ #ifdef IS_IN_libpthread int -lll_unlock_wake_cb (int *futex) -{ - int val = atomic_exchange_24_rel (futex, 0); - - if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); - - return 0; -} - - -int __lll_timedwait_tid (int *tidp, const struct timespec *abstime) { int tid; @@ -127,5 +115,4 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime) return 0; } - #endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S index b92fa5c895..502f1d442f 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S @@ -220,26 +220,6 @@ __lll_mutex_timedlock_wait: #endif -#ifdef NOT_IN_libc - .globl lll_unlock_wake_cb - .type lll_unlock_wake_cb,@function - .hidden lll_unlock_wake_cb - .align 16 -lll_unlock_wake_cb: - pushq %rsi - pushq %rdx - - LOCK - addl $1, (%rdi) - jng 1f - - popq %rdx - popq %rsi - retq - .size lll_unlock_wake_cb,.-lll_unlock_wake_cb -#endif - - .globl __lll_mutex_unlock_wake .type __lll_mutex_unlock_wake,@function .hidden __lll_mutex_unlock_wake @@ -253,8 +233,7 @@ __lll_mutex_unlock_wake: cfi_offset(%rsi, -16) cfi_offset(%rdx, -24) - /* NB: the label '1' is needed by lll_unlock_wake_cb. */ -1: movl $0, (%rdi) + movl $0, (%rdi) LOAD_FUTEX_WAKE (%esi) movl $1, %edx /* Wake one thread. */ movl $SYS_futex, %eax diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h index fbe48b37aa..d3055cbb23 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h @@ -455,9 +455,6 @@ typedef int lll_lock_t; #define LLL_LOCK_INITIALIZER_LOCKED (1) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - - /* The states of a lock are: 0 - untaken 1 - taken by one user |