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.
2007-05-29 Ulrich Drepper <drepper@redhat.com>
- * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
- (__lll_mutex_unlock_wake): Add back label '1' which went AWOL quite
- some time ago.
+ * 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.
* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
whether there are more than one thread makes no sense here since
-/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
struct pthread_attr *iattr = (struct pthread_attr *) attr;
int ret = 0;
- /* We have to handle cancellation in the following code since we are
- locking another threads desriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &thread->lock);
-
lll_lock (thread->lock);
/* The thread library is responsible for keeping the values in the
lll_unlock (thread->lock);
- pthread_cleanup_pop (0);
-
return ret;
}
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
int result = 0;
- /* We have to handle cancellation in the following code since we are
- locking another threads descriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
lll_lock (pd->lock);
/* The library is responsible for maintaining the values at all
lll_unlock (pd->lock);
- pthread_cleanup_pop (0);
-
return result;
}
strong_alias (__pthread_getschedparam, pthread_getschedparam)
-/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
int result = 0;
- /* We have to handle cancellation in the following code since we are
- locking another threads desriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
lll_lock (pd->lock);
struct sched_param p;
lll_unlock (pd->lock);
- pthread_cleanup_pop (0);
-
return result;
}
strong_alias (__pthread_setschedparam, pthread_setschedparam)
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
struct sched_param param;
param.sched_priority = prio;
- /* We have to handle cancellation in the following code since we are
- locking another threads desriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
lll_lock (pd->lock);
/* If the thread should have higher priority because of some
lll_unlock (pd->lock);
- pthread_cleanup_pop (0);
-
return result;
}
-/* 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
#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
#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
__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:
-/* 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.
/* 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)
/* 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.
}
-/* 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;
return 0;
}
-
#endif
#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
-/* 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.
#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
-/* 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
#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
-/* 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
} 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
-/* 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.
/* 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)
/* 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.
}
-/* 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;
return 0;
}
-
#endif
#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
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
#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