2014-01-01 11:03:15 +00:00
|
|
|
/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
|
2003-03-11 06:52:08 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
2003-03-11 06:52:08 +00:00
|
|
|
|
|
|
|
#include <sysdep.h>
|
2009-07-18 02:08:54 +00:00
|
|
|
#include <kernel-features.h>
|
* sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
atomic_full_barrier.
2007-07-31 Jakub Jelinek <jakub@redhat.com>
* allocatestack.c (stack_cache_lock): Change type to int.
(get_cached_stack, allocate_stack, __deallocate_stack,
__make_stacks_executable, __find_thread_by_id, __nptl_setxid,
__pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
as second argument to lll_lock and lll_unlock macros on
stack_cache_lock.
* pthread_create.c (__find_in_stack_list): Likewise.
(start_thread): Similarly with pd->lock. Use lll_robust_dead
macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
as second argument.
* descr.h (struct pthread): Change lock and setxid_futex field
type to int.
* old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
* old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
* old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
Likewise.
* old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
* pthread_cond_init.c (__pthread_cond_init): Likewise.
* pthreadP.h (__attr_list_lock): Change type to int.
* pthread_attr_init.c (__attr_list_lock): Likewise.
* pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
lll_{,un}lock.
* pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
also for lll_futex_{wake,wait}.
* pthread_barrier_init.c (pthread_barrier_init): Make iattr
a pointer to const.
* pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
LLL_SHARED as second argument to lll_{,un}lock.
* pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
* pthread_cond_signal.c (__pthread_cond_singal): Likewise.
* pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
* pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
Likewise.
* pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
as second argument to lll_{,un}lock macros on pd->lock.
* pthread_getschedparam.c (__pthread_getschedparam): Likewise.
* pthread_setschedparam.c (__pthread_setschedparam): Likewise.
* pthread_setschedprio.c (pthread_setschedprio): Likewise.
* tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
Likewise.
* sysdeps/pthread/createthread.c (do_clone, create_thread):
Likewise.
* pthread_once.c (once_lock): Change type to int.
(__pthread_once): Pass LLL_PRIVATE as second argument to
lll_{,un}lock macros on once_lock.
* pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
rwlock->__data.__shared as second argument to them and similarly
for lll_futex_w*.
* pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
Likewise.
* pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
Likewise.
* pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
* pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
* pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
* pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
* sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
to lll_{,un}lock macros on __sem_mappings_lock.
* sem_open.c (check_add_mapping): Likewise.
(__sem_mappings_lock): Change type to int.
* semaphoreP.h (__sem_mappings_lock): Likewise.
* pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
instead of lll_*mutex_*, pass LLL_SHARED as last
argument.
(__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
pass LLL_SHARED as last argument.
* sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
pass LLL_SHARED as last argument.
* pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
LLL_SHARED as last argument.
* pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
* pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
Similarly.
* sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
__libc_lock_lock_recursive, __libc_lock_unlock,
__libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
argument to lll_{,un}lock.
* sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
_IO_lock_unlock): Likewise.
* sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
compound literal.
* sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
__fork_lock.
* sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
free_mem): Likewise.
(__fork_lock): Change type to int.
* sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
* sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
lll_futex_wake.
* sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
* sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
* sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
New function.
(__lll_lock_wait, __lll_timedlock_wait): Add private argument and
pass it through to lll_futex_*wait, only compile in when
IS_IN_libpthread.
* sysdeps/unix/sysv/linux/lowlevelrobustlock.c
(__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
argument and pass it through to lll_futex_*wait.
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
inline functions to __lll_* resp. __lll_robust_*.
(LLL_MUTEX_LOCK_INITIALIZER): Remove.
(lll_mutex_dead): Add private argument.
(__lll_lock_wait_private): New prototype.
(__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
__lll_robust_lock_timedwait): Add private argument to prototypes.
(__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
call __lll_lock_wait_private, otherwise pass private to
__lll_lock_wait.
(__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
__lll_robust_timedlock): Add private argument, pass it to
__lll_*wait functions.
(__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
call __lll_unlock_wake_private, otherwise pass private to
__lll_unlock_wake.
(__lll_robust_unlock): Add private argument, pass it to
__lll_robust_unlock_wake.
(lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
argument, pass it through to __lll_* inline function.
(__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
(lll_lock_t): Remove.
(__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
__lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
lll_cond_wake, lll_cond_broadcast): Remove.
* 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/sparc/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
the header from assembler. Renamed all lll_mutex_* resp.
lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
(LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
(LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
(__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
__lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
Remove prototype.
(__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
(lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
(lll_trylock): Likewise, use __lll_trylock_asm, pass
MULTIPLE_THREADS_OFFSET as another asm operand.
(lll_lock): Add private argument, use __lll_lock_asm_start, pass
MULTIPLE_THREADS_OFFSET as last asm operand, call
__lll_lock_wait_private if private is constant LLL_PRIVATE,
otherwise pass private as another argument to __lll_lock_wait.
(lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
lll_timedlock, lll_robust_timedlock): Add private argument, pass
private as another argument to __lll_*lock_wait call.
(lll_unlock): Add private argument, use __lll_unlock_asm, pass
MULTIPLE_THREADS_OFFSET as another asm operand, call
__lll_unlock_wake_private if private is constant LLL_PRIVATE,
otherwise pass private as another argument to __lll_unlock_wake.
(lll_robust_unlock): Add private argument, pass private as another
argument to __lll_unlock_wake.
(lll_robust_dead): Add private argument, use __lll_private_flag
macro.
(lll_islocked): Use LLL_LOCK_INITIALIZER instead of
LLL_MUTEX_LOCK_INITIALIZER.
(lll_lock_t): Remove.
(LLL_LOCK_INITIALIZER_WAITERS): Define.
(__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
__lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
lll_cond_wake, lll_cond_broadcast): Remove.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2007-05-2{3,9} changes.
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
kernel-features.h and lowlevellock.h.
(LOAD_PRIVATE_FUTEX_WAIT): Define.
(LOAD_FUTEX_WAIT): Rewritten.
(LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
define.
(__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
(__lll_mutex_lock_wait): Rename to ...
(__lll_lock_wait): ... this. Take futex addr from %edx instead of
%ecx, %ecx is now private argument. Don't compile in for libc.so.
(__lll_mutex_timedlock_wait): Rename to ...
(__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
contains private argument. Don't compile in for libc.so.
(__lll_mutex_unlock_wake): Rename to ...
(__lll_unlock_wake): ... this. %ecx contains private argument.
Don't compile in for libc.so.
(__lll_timedwait_tid): Use __NR_gettimeofday.
* sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
kernel-features.h and lowlevellock.h.
(LOAD_FUTEX_WAIT): Define.
(LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
define.
(__lll_robust_mutex_lock_wait): Rename to ...
(__lll_robust_lock_wait): ... this. Futex addr is now in %edx
argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
macro.
(__lll_robust_mutex_timedlock_wait): Rename to ...
(__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
%esi argument contains private, use LOAD_FUTEX_WAIT macro.
* sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
__lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
to __lll_lock_wait in %edx.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
Include lowlevellock.h and pthread-errnos.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
(__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
cond_lock address in %edx rather than %ecx to __lll_lock_wait,
pass LLL_SHARED in %ecx to both __lll_lock_wait and
__lll_unlock_wake.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
Include lowlevellock.h and pthread-errnos.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
(__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
cond_lock address in %edx rather than %ecx to __lll_lock_wait,
pass LLL_SHARED in %ecx to both __lll_lock_wait and
__lll_unlock_wake.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
Include lowlevellock.h.
(SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
Don't define.
(__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
cond_lock address in %edx rather than %ecx to __lll_lock_wait,
pass LLL_SHARED in %ecx to both __lll_lock_wait and
__lll_unlock_wake. Use __NR_gettimeofday.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
to __lll_*, pass cond_lock address in %edx rather than %ecx to
__lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
MUTEX(%ebx) address in %edx rather than %ecx to
__lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
and __lll_unlock_wake. Move return value from %ecx to %edx
register.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
Include lowlevellock.h.
(SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
Don't define.
(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
MUTEX(%ebp) address in %edx rather than %ecx to
__lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
and __lll_unlock_wake. Move return value from %ecx to %edx
register. Use __NR_gettimeofday.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
Include lowlevellock.h.
(SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
Don't define.
(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
MUTEX(%ebp) address in %edx rather than %ecx to
__lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
and __lll_unlock_wake. Move return value from %ecx to %edx
register. Use __NR_gettimeofday.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
MUTEX(%edi) address in %edx rather than %ecx to
__lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
MUTEX(%ebx) address in %edx rather than %ecx to
__lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
and __lll_unlock_wake. Move return value from %ecx to %edx
register.
* sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
lowlevellock.h.
(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
define.
* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
(LOCK, SYS_futex, FUTEX_WAKE): Don't define.
* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
lowlevellock.h.
(LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
(sem_timedwait): Use __NR_gettimeofday.
* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
lowlevellock.h.
(LOCK): Don't define.
* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
lowlevellock.h.
(LOCK, SYS_futex, FUTEX_WAIT): Don't define.
* sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
are waiters.
* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2007-05-2{3,9} changes.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
kernel-features.h and lowlevellock.h.
(LOAD_PRIVATE_FUTEX_WAIT): Define.
(LOAD_FUTEX_WAIT): Rewritten.
(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
(__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
(__lll_mutex_lock_wait): Rename to ...
(__lll_lock_wait): ... this. %esi is now private argument.
Don't compile in for libc.so.
(__lll_mutex_timedlock_wait): Rename to ...
(__lll_timedlock_wait): ... this. %esi contains private argument.
Don't compile in for libc.so.
(__lll_mutex_unlock_wake): Rename to ...
(__lll_unlock_wake): ... this. %esi contains private argument.
Don't compile in for libc.so.
* sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
kernel-features.h and lowlevellock.h.
(LOAD_FUTEX_WAIT): Define.
(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
(__lll_robust_mutex_lock_wait): Rename to ...
(__lll_robust_lock_wait): ... this. %esi argument contains private.
Use LOAD_FUTEX_WAIT macro.
(__lll_robust_mutex_timedlock_wait): Rename to ...
(__lll_robust_timedlock_wait): ... this. %esi argument contains
private, use LOAD_FUTEX_WAIT macro.
* sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
__lll_lock_wait and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
Include lowlevellock.h and pthread-errnos.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
(__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
pass LLL_SHARED in %esi to both __lll_lock_wait and
__lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
Include lowlevellock.h and pthread-errnos.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
(__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
pass LLL_SHARED in %esi to both __lll_lock_wait and
__lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
pass LLL_SHARED in %esi to both __lll_lock_wait and
__lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
(__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
Don't define.
(__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
pass PSHARED(%rdi) in %esi to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
Don't define.
(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
pass PSHARED(%rdi) in %esi to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
Don't define.
(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
pass PSHARED(%rdi) in %esi to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
Don't define.
(__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
pass PSHARED(%rdi) in %esi to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
Include lowlevellock.h.
(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
Don't define.
(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
and __lll_unlock_wake.
* sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
lowlevellock.h.
(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
define.
* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
(LOCK, SYS_futex, FUTEX_WAKE): Don't define.
* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
lowlevellock.h.
(LOCK, SYS_futex, FUTEX_WAIT): Don't define.
* sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
lowlevellock.h.
(LOCK): Don't define.
* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
lowlevellock.h.
(LOCK, SYS_futex, FUTEX_WAIT): Don't define.
* sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
* sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
* sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
* sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
(__lll_lock_wait_private): New function.
(__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
it to lll_futex_*wait. Don't compile in for libc.so.
* sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
Remove.
* sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
(struct sparc_pthread_barrier): Remove.
(pthread_barrier_wait): Use union sparc_pthread_barrier instead of
struct sparc_pthread_barrier. Pass
ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
and lll_futex_wait macros.
* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
Remove.
* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
Include sparc pthread_barrier_wait.c instead of generic one.
2007-08-01 04:47:26 +00:00
|
|
|
#include <lowlevellock.h>
|
2003-03-11 06:52:08 +00:00
|
|
|
#include <shlib-compat.h>
|
2003-03-12 10:28:07 +00:00
|
|
|
#include <pthread-errnos.h>
|
2007-05-26 01:31:40 +00:00
|
|
|
#include <structsem.h>
|
2003-03-11 06:52:08 +00:00
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.globl sem_timedwait
|
|
|
|
.type sem_timedwait,@function
|
|
|
|
.align 16
|
|
|
|
sem_timedwait:
|
2007-05-26 01:31:40 +00:00
|
|
|
.LSTARTCODE:
|
2009-07-17 23:26:06 +00:00
|
|
|
cfi_startproc
|
|
|
|
#ifdef SHARED
|
|
|
|
cfi_personality(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect,
|
|
|
|
DW.ref.__gcc_personality_v0)
|
|
|
|
cfi_lsda(DW_EH_PE_pcrel | DW_EH_PE_sdata4, .LexceptSTART)
|
|
|
|
#else
|
|
|
|
cfi_personality(DW_EH_PE_udata4, __gcc_personality_v0)
|
|
|
|
cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
|
|
|
|
#endif
|
2007-05-26 01:31:40 +00:00
|
|
|
#if VALUE == 0
|
2003-03-11 06:52:08 +00:00
|
|
|
movl (%rdi), %eax
|
2007-05-26 01:31:40 +00:00
|
|
|
#else
|
|
|
|
movl VALUE(%rdi), %eax
|
|
|
|
#endif
|
2003-03-11 06:52:08 +00:00
|
|
|
2: testl %eax, %eax
|
|
|
|
je 1f
|
|
|
|
|
2003-03-12 05:45:00 +00:00
|
|
|
leaq -1(%rax), %rdx
|
2003-03-11 06:52:08 +00:00
|
|
|
LOCK
|
2007-05-26 01:31:40 +00:00
|
|
|
#if VALUE == 0
|
2003-03-11 06:52:08 +00:00
|
|
|
cmpxchgl %edx, (%rdi)
|
2007-05-26 01:31:40 +00:00
|
|
|
#else
|
|
|
|
cmpxchgl %edx, VALUE(%rdi)
|
|
|
|
#endif
|
2003-03-11 06:52:08 +00:00
|
|
|
jne 2b
|
|
|
|
|
|
|
|
xorl %eax, %eax
|
2003-03-11 19:40:00 +00:00
|
|
|
retq
|
2003-03-11 06:52:08 +00:00
|
|
|
|
|
|
|
/* Check whether the timeout value is valid. */
|
2009-08-09 00:48:09 +00:00
|
|
|
1: cmpq $1000000000, 8(%rsi)
|
2003-03-11 06:52:08 +00:00
|
|
|
jae 6f
|
|
|
|
|
2009-07-18 02:08:54 +00:00
|
|
|
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
|
|
# ifdef PIC
|
|
|
|
cmpl $0, __have_futex_clock_realtime(%rip)
|
|
|
|
# else
|
|
|
|
cmpl $0, __have_futex_clock_realtime
|
|
|
|
# endif
|
|
|
|
je .Lreltmo
|
|
|
|
#endif
|
2003-03-11 06:52:08 +00:00
|
|
|
|
2010-07-02 02:07:14 +00:00
|
|
|
cmpq $0, (%rsi)
|
|
|
|
js 16f
|
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
/* This push is only needed to store the sem_t pointer for the
|
|
|
|
exception handler. */
|
|
|
|
pushq %rdi
|
|
|
|
cfi_adjust_cfa_offset(8)
|
|
|
|
|
|
|
|
movq %rsi, %r10
|
|
|
|
|
|
|
|
LOCK
|
2012-05-15 19:47:31 +00:00
|
|
|
LP_OP(add) $1, NWAITERS(%rdi)
|
2009-08-09 00:48:09 +00:00
|
|
|
|
2007-05-26 01:31:40 +00:00
|
|
|
.LcleanupSTART:
|
2009-07-18 02:08:54 +00:00
|
|
|
13: call __pthread_enable_asynccancel
|
2009-08-09 00:48:09 +00:00
|
|
|
movl %eax, %r8d
|
2007-05-25 19:27:03 +00:00
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
#if VALUE != 0
|
|
|
|
leaq VALUE(%rdi), %rdi
|
2007-05-26 01:31:40 +00:00
|
|
|
#endif
|
2009-07-18 02:08:54 +00:00
|
|
|
movl $0xffffffff, %r9d
|
|
|
|
movl $FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
|
2007-05-26 04:49:06 +00:00
|
|
|
orl PRIVATE(%rdi), %esi
|
2005-03-31 10:02:53 +00:00
|
|
|
movl $SYS_futex, %eax
|
2003-03-11 06:52:08 +00:00
|
|
|
xorl %edx, %edx
|
|
|
|
syscall
|
2009-08-09 00:48:09 +00:00
|
|
|
movq %rax, %r9
|
|
|
|
#if VALUE != 0
|
|
|
|
leaq -VALUE(%rdi), %rdi
|
|
|
|
#endif
|
2003-03-11 06:52:08 +00:00
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
xchgq %r8, %rdi
|
2003-06-08 05:28:14 +00:00
|
|
|
call __pthread_disable_asynccancel
|
2007-05-26 01:31:40 +00:00
|
|
|
.LcleanupEND:
|
2009-08-09 00:48:09 +00:00
|
|
|
movq %r8, %rdi
|
2003-06-08 05:28:14 +00:00
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
testq %r9, %r9
|
2009-07-18 02:08:54 +00:00
|
|
|
je 11f
|
2009-08-09 00:48:09 +00:00
|
|
|
cmpq $-EWOULDBLOCK, %r9
|
2003-03-11 06:52:08 +00:00
|
|
|
jne 3f
|
|
|
|
|
2009-07-18 02:08:54 +00:00
|
|
|
11:
|
2007-05-26 01:31:40 +00:00
|
|
|
#if VALUE == 0
|
2009-08-09 00:48:09 +00:00
|
|
|
movl (%rdi), %eax
|
2007-05-26 01:31:40 +00:00
|
|
|
#else
|
2009-08-09 00:48:09 +00:00
|
|
|
movl VALUE(%rdi), %eax
|
2007-05-26 01:31:40 +00:00
|
|
|
#endif
|
2009-07-18 02:08:54 +00:00
|
|
|
14: testl %eax, %eax
|
|
|
|
je 13b
|
2003-03-11 06:52:08 +00:00
|
|
|
|
2003-03-12 05:45:00 +00:00
|
|
|
leaq -1(%rax), %rcx
|
2003-03-11 06:52:08 +00:00
|
|
|
LOCK
|
2007-05-26 01:31:40 +00:00
|
|
|
#if VALUE == 0
|
2009-08-09 00:48:09 +00:00
|
|
|
cmpxchgl %ecx, (%rdi)
|
2007-05-26 01:31:40 +00:00
|
|
|
#else
|
2009-08-09 00:48:09 +00:00
|
|
|
cmpxchgl %ecx, VALUE(%rdi)
|
2007-05-26 01:31:40 +00:00
|
|
|
#endif
|
2009-07-18 02:08:54 +00:00
|
|
|
jne 14b
|
2003-03-11 06:52:08 +00:00
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
xorl %eax, %eax
|
2007-05-26 01:31:40 +00:00
|
|
|
|
2009-07-18 02:08:54 +00:00
|
|
|
15: LOCK
|
2012-05-15 19:47:31 +00:00
|
|
|
LP_OP(sub) $1, NWAITERS(%rdi)
|
2007-05-26 01:31:40 +00:00
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
leaq 8(%rsp), %rsp
|
2009-07-17 23:26:06 +00:00
|
|
|
cfi_adjust_cfa_offset(-8)
|
2003-03-11 06:52:08 +00:00
|
|
|
retq
|
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
cfi_adjust_cfa_offset(8)
|
|
|
|
3: negq %r9
|
2003-03-11 06:52:08 +00:00
|
|
|
movq errno@gottpoff(%rip), %rdx
|
2009-08-09 00:48:09 +00:00
|
|
|
movl %r9d, %fs:(%rdx)
|
2003-03-11 06:52:08 +00:00
|
|
|
|
|
|
|
orl $-1, %eax
|
2009-07-18 02:08:54 +00:00
|
|
|
jmp 15b
|
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
cfi_adjust_cfa_offset(-8)
|
|
|
|
6:
|
|
|
|
movq errno@gottpoff(%rip), %rdx
|
|
|
|
movl $EINVAL, %fs:(%rdx)
|
|
|
|
|
|
|
|
orl $-1, %eax
|
|
|
|
|
|
|
|
retq
|
|
|
|
|
2010-07-02 02:07:14 +00:00
|
|
|
16:
|
|
|
|
movq errno@gottpoff(%rip), %rdx
|
|
|
|
movl $ETIMEDOUT, %fs:(%rdx)
|
|
|
|
|
|
|
|
orl $-1, %eax
|
|
|
|
|
|
|
|
retq
|
|
|
|
|
2009-07-18 02:08:54 +00:00
|
|
|
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
|
|
.Lreltmo:
|
2009-08-09 00:48:09 +00:00
|
|
|
pushq %r12
|
|
|
|
cfi_adjust_cfa_offset(8)
|
|
|
|
cfi_rel_offset(%r12, 0)
|
|
|
|
pushq %r13
|
|
|
|
cfi_adjust_cfa_offset(8)
|
|
|
|
cfi_rel_offset(%r13, 0)
|
|
|
|
pushq %r14
|
|
|
|
cfi_adjust_cfa_offset(8)
|
|
|
|
cfi_rel_offset(%r14, 0)
|
|
|
|
|
|
|
|
#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
|
|
# define STACKFRAME 8
|
|
|
|
#else
|
|
|
|
# define STACKFRAME 24
|
|
|
|
#endif
|
|
|
|
subq $STACKFRAME, %rsp
|
|
|
|
cfi_adjust_cfa_offset(STACKFRAME)
|
|
|
|
|
|
|
|
movq %rdi, %r12
|
|
|
|
movq %rsi, %r13
|
|
|
|
|
|
|
|
LOCK
|
2012-05-15 19:47:31 +00:00
|
|
|
LP_OP(add) $1, NWAITERS(%r12)
|
2009-08-09 00:48:09 +00:00
|
|
|
|
2009-07-18 02:08:54 +00:00
|
|
|
7: xorl %esi, %esi
|
2011-09-07 03:17:53 +00:00
|
|
|
movq %rsp,%rdi
|
|
|
|
/* This call works because we directly jump to a system call entry
|
|
|
|
which preserves all the registers. */
|
|
|
|
call JUMPTARGET(__gettimeofday)
|
2009-07-18 02:08:54 +00:00
|
|
|
|
|
|
|
/* Compute relative timeout. */
|
|
|
|
movq 8(%rsp), %rax
|
|
|
|
movl $1000, %edi
|
|
|
|
mul %rdi /* Milli seconds to nano seconds. */
|
|
|
|
movq (%r13), %rdi
|
|
|
|
movq 8(%r13), %rsi
|
|
|
|
subq (%rsp), %rdi
|
|
|
|
subq %rax, %rsi
|
|
|
|
jns 5f
|
|
|
|
addq $1000000000, %rsi
|
|
|
|
decq %rdi
|
|
|
|
5: testq %rdi, %rdi
|
|
|
|
movl $ETIMEDOUT, %r14d
|
2009-08-09 00:48:09 +00:00
|
|
|
js 36f /* Time is already up. */
|
2009-07-18 02:08:54 +00:00
|
|
|
|
|
|
|
movq %rdi, (%rsp) /* Store relative timeout. */
|
|
|
|
movq %rsi, 8(%rsp)
|
|
|
|
|
|
|
|
.LcleanupSTART2:
|
|
|
|
call __pthread_enable_asynccancel
|
|
|
|
movl %eax, 16(%rsp)
|
|
|
|
|
|
|
|
movq %rsp, %r10
|
|
|
|
# if VALUE == 0
|
|
|
|
movq %r12, %rdi
|
|
|
|
# else
|
|
|
|
leaq VALUE(%r12), %rdi
|
|
|
|
# endif
|
|
|
|
# if FUTEX_WAIT == 0
|
|
|
|
movl PRIVATE(%rdi), %esi
|
|
|
|
# else
|
|
|
|
movl $FUTEX_WAIT, %esi
|
|
|
|
orl PRIVATE(%rdi), %esi
|
|
|
|
# endif
|
|
|
|
movl $SYS_futex, %eax
|
|
|
|
xorl %edx, %edx
|
|
|
|
syscall
|
|
|
|
movq %rax, %r14
|
|
|
|
|
|
|
|
movl 16(%rsp), %edi
|
|
|
|
call __pthread_disable_asynccancel
|
|
|
|
.LcleanupEND2:
|
|
|
|
|
|
|
|
testq %r14, %r14
|
|
|
|
je 9f
|
|
|
|
cmpq $-EWOULDBLOCK, %r14
|
2009-08-09 00:48:09 +00:00
|
|
|
jne 33f
|
2009-07-18 02:08:54 +00:00
|
|
|
|
|
|
|
9:
|
|
|
|
# if VALUE == 0
|
|
|
|
movl (%r12), %eax
|
|
|
|
# else
|
|
|
|
movl VALUE(%r12), %eax
|
|
|
|
# endif
|
|
|
|
8: testl %eax, %eax
|
|
|
|
je 7b
|
|
|
|
|
|
|
|
leaq -1(%rax), %rcx
|
|
|
|
LOCK
|
|
|
|
# if VALUE == 0
|
|
|
|
cmpxchgl %ecx, (%r12)
|
|
|
|
# else
|
|
|
|
cmpxchgl %ecx, VALUE(%r12)
|
|
|
|
# endif
|
|
|
|
jne 8b
|
2009-08-09 00:48:09 +00:00
|
|
|
|
|
|
|
xorl %eax, %eax
|
|
|
|
|
|
|
|
45: LOCK
|
2012-05-15 19:47:31 +00:00
|
|
|
LP_OP(sub) $1, NWAITERS(%r12)
|
2009-08-09 00:48:09 +00:00
|
|
|
|
|
|
|
addq $STACKFRAME, %rsp
|
|
|
|
cfi_adjust_cfa_offset(-STACKFRAME)
|
|
|
|
popq %r14
|
|
|
|
cfi_adjust_cfa_offset(-8)
|
|
|
|
cfi_restore(%r14)
|
|
|
|
popq %r13
|
|
|
|
cfi_adjust_cfa_offset(-8)
|
|
|
|
cfi_restore(%r13)
|
|
|
|
popq %r12
|
|
|
|
cfi_adjust_cfa_offset(-8)
|
|
|
|
cfi_restore(%r12)
|
|
|
|
retq
|
|
|
|
|
|
|
|
cfi_adjust_cfa_offset(STACKFRAME + 3 * 8)
|
|
|
|
cfi_rel_offset(%r12, STACKFRAME + 2 * 8)
|
|
|
|
cfi_rel_offset(%r13, STACKFRAME + 1 * 8)
|
|
|
|
cfi_rel_offset(%r14, STACKFRAME)
|
|
|
|
33: negq %r14
|
|
|
|
36:
|
|
|
|
movq errno@gottpoff(%rip), %rdx
|
|
|
|
movl %r14d, %fs:(%rdx)
|
|
|
|
|
|
|
|
orl $-1, %eax
|
|
|
|
jmp 45b
|
|
|
|
#endif
|
|
|
|
cfi_endproc
|
2003-03-11 06:52:08 +00:00
|
|
|
.size sem_timedwait,.-sem_timedwait
|
2007-05-26 01:31:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
.type sem_timedwait_cleanup,@function
|
|
|
|
sem_timedwait_cleanup:
|
2009-08-09 00:48:09 +00:00
|
|
|
cfi_startproc
|
|
|
|
cfi_adjust_cfa_offset(8)
|
|
|
|
|
|
|
|
movq (%rsp), %rdi
|
2007-05-26 01:31:40 +00:00
|
|
|
LOCK
|
2012-05-15 19:47:31 +00:00
|
|
|
LP_OP(sub) $1, NWAITERS(%rdi)
|
2007-05-26 01:31:40 +00:00
|
|
|
movq %rax, %rdi
|
|
|
|
.LcallUR:
|
|
|
|
call _Unwind_Resume@PLT
|
|
|
|
hlt
|
|
|
|
.LENDCODE:
|
2009-07-17 23:26:06 +00:00
|
|
|
cfi_endproc
|
2007-05-26 01:31:40 +00:00
|
|
|
.size sem_timedwait_cleanup,.-sem_timedwait_cleanup
|
|
|
|
|
|
|
|
|
2009-08-09 00:48:09 +00:00
|
|
|
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
|
|
.type sem_timedwait_cleanup2,@function
|
|
|
|
sem_timedwait_cleanup2:
|
|
|
|
cfi_startproc
|
|
|
|
cfi_adjust_cfa_offset(STACKFRAME + 3 * 8)
|
|
|
|
cfi_rel_offset(%r12, STACKFRAME + 2 * 8)
|
|
|
|
cfi_rel_offset(%r13, STACKFRAME + 1 * 8)
|
|
|
|
cfi_rel_offset(%r14, STACKFRAME)
|
|
|
|
|
|
|
|
LOCK
|
2012-05-15 19:47:31 +00:00
|
|
|
LP_OP(sub) $1, NWAITERS(%r12)
|
2009-08-09 00:48:09 +00:00
|
|
|
movq %rax, %rdi
|
|
|
|
movq STACKFRAME(%rsp), %r14
|
|
|
|
movq STACKFRAME+8(%rsp), %r13
|
|
|
|
movq STACKFRAME+16(%rsp), %r12
|
|
|
|
.LcallUR2:
|
|
|
|
call _Unwind_Resume@PLT
|
|
|
|
hlt
|
|
|
|
.LENDCODE2:
|
|
|
|
cfi_endproc
|
|
|
|
.size sem_timedwait_cleanup2,.-sem_timedwait_cleanup2
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2007-05-26 01:31:40 +00:00
|
|
|
.section .gcc_except_table,"a",@progbits
|
|
|
|
.LexceptSTART:
|
2009-07-17 23:39:27 +00:00
|
|
|
.byte DW_EH_PE_omit # @LPStart format
|
|
|
|
.byte DW_EH_PE_omit # @TType format
|
|
|
|
.byte DW_EH_PE_uleb128 # call-site format
|
2007-05-26 01:31:40 +00:00
|
|
|
.uleb128 .Lcstend-.Lcstbegin
|
|
|
|
.Lcstbegin:
|
|
|
|
.uleb128 .LcleanupSTART-.LSTARTCODE
|
|
|
|
.uleb128 .LcleanupEND-.LcleanupSTART
|
|
|
|
.uleb128 sem_timedwait_cleanup-.LSTARTCODE
|
|
|
|
.uleb128 0
|
2009-07-18 02:08:54 +00:00
|
|
|
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
|
|
.uleb128 .LcleanupSTART2-.LSTARTCODE
|
|
|
|
.uleb128 .LcleanupEND2-.LcleanupSTART2
|
2009-08-09 00:48:09 +00:00
|
|
|
.uleb128 sem_timedwait_cleanup2-.LSTARTCODE
|
2009-07-18 02:08:54 +00:00
|
|
|
.uleb128 0
|
|
|
|
#endif
|
2007-05-26 01:31:40 +00:00
|
|
|
.uleb128 .LcallUR-.LSTARTCODE
|
|
|
|
.uleb128 .LENDCODE-.LcallUR
|
|
|
|
.uleb128 0
|
|
|
|
.uleb128 0
|
2009-08-09 00:48:09 +00:00
|
|
|
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
|
|
.uleb128 .LcallUR2-.LSTARTCODE
|
|
|
|
.uleb128 .LENDCODE2-.LcallUR2
|
|
|
|
.uleb128 0
|
|
|
|
.uleb128 0
|
|
|
|
#endif
|
2007-05-26 01:31:40 +00:00
|
|
|
.Lcstend:
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SHARED
|
|
|
|
.hidden DW.ref.__gcc_personality_v0
|
|
|
|
.weak DW.ref.__gcc_personality_v0
|
|
|
|
.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
|
2012-05-15 19:47:31 +00:00
|
|
|
.align LP_SIZE
|
2007-05-26 01:31:40 +00:00
|
|
|
.type DW.ref.__gcc_personality_v0, @object
|
2012-05-15 19:47:31 +00:00
|
|
|
.size DW.ref.__gcc_personality_v0, LP_SIZE
|
2007-05-26 01:31:40 +00:00
|
|
|
DW.ref.__gcc_personality_v0:
|
2012-05-15 19:47:31 +00:00
|
|
|
ASM_ADDR __gcc_personality_v0
|
2007-05-26 01:31:40 +00:00
|
|
|
#endif
|