diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64/lowlevellock.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/lowlevellock.h | 84 |
1 files changed, 2 insertions, 82 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h index de753fd4de..eedb6fc990 100644 --- a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2016 Free Software Foundation, Inc. +/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -26,7 +26,6 @@ # include <sys/param.h> # include <bits/pthreadtypes.h> # include <kernel-features.h> -# include <tcb-offsets.h> # ifndef LOCK_INSTR # ifdef UP @@ -136,23 +135,6 @@ : "cx", "r11", "cc", "memory"); \ }) \ -#define lll_robust_lock(futex, id, private) \ - ({ int result, ignore1, ignore2; \ - __asm __volatile (LOCK_INSTR "cmpxchgl %4, %2\n\t" \ - "jz 24f\n" \ - "1:\tlea %2, %%" RDI_LP "\n" \ - "2:\tsub $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset 128\n" \ - "3:\tcallq __lll_robust_lock_wait\n" \ - "4:\tadd $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset -128\n" \ - "24:" \ - : "=S" (ignore1), "=D" (ignore2), "=m" (futex), \ - "=a" (result) \ - : "1" (id), "m" (futex), "3" (0), "0" (private) \ - : "cx", "r11", "cc", "memory"); \ - result; }) - #define lll_cond_lock(futex, private) \ (void) \ ({ int ignore1, ignore2, ignore3; \ @@ -171,24 +153,6 @@ : "cx", "r11", "cc", "memory"); \ }) -#define lll_robust_cond_lock(futex, id, private) \ - ({ int result, ignore1, ignore2; \ - __asm __volatile (LOCK_INSTR "cmpxchgl %4, %2\n\t" \ - "jz 24f\n" \ - "1:\tlea %2, %%" RDI_LP "\n" \ - "2:\tsub $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset 128\n" \ - "3:\tcallq __lll_robust_lock_wait\n" \ - "4:\tadd $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset -128\n" \ - "24:" \ - : "=S" (ignore1), "=D" (ignore2), "=m" (futex), \ - "=a" (result) \ - : "1" (id | FUTEX_WAITERS), "m" (futex), "3" (0), \ - "0" (private) \ - : "cx", "r11", "cc", "memory"); \ - result; }) - #define lll_timedlock(futex, timeout, private) \ ({ int result, ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %1, %4\n\t" \ @@ -215,25 +179,6 @@ extern int __lll_timedlock_elision (int *futex, short *adapt_count, #define lll_timedlock_elision(futex, adapt_count, timeout, private) \ __lll_timedlock_elision(&(futex), &(adapt_count), timeout, private) -#define lll_robust_timedlock(futex, timeout, id, private) \ - ({ int result, ignore1, ignore2, ignore3; \ - __asm __volatile (LOCK_INSTR "cmpxchgl %1, %4\n\t" \ - "jz 24f\n\t" \ - "1:\tlea %4, %%" RDI_LP "\n" \ - "0:\tmov %8, %%" RDX_LP "\n" \ - "2:\tsub $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset 128\n" \ - "3:\tcallq __lll_robust_timedlock_wait\n" \ - "4:\tadd $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset -128\n" \ - "24:" \ - : "=a" (result), "=D" (ignore1), "=S" (ignore2), \ - "=&d" (ignore3), "=m" (futex) \ - : "0" (0), "1" (id), "m" (futex), "m" (timeout), \ - "2" (private) \ - : "memory", "cx", "cc", "r10", "r11"); \ - result; }) - #if !IS_IN (libc) || defined UP # define __lll_unlock_asm_start LOCK_INSTR "decl %0\n\t" \ "je 24f\n\t" @@ -276,26 +221,6 @@ extern int __lll_timedlock_elision (int *futex, short *adapt_count, : "ax", "cx", "r11", "cc", "memory"); \ }) -#define lll_robust_unlock(futex, private) \ - do \ - { \ - int ignore; \ - __asm __volatile (LOCK_INSTR "andl %2, %0\n\t" \ - "je 24f\n\t" \ - "1:\tlea %0, %%" RDI_LP "\n" \ - "2:\tsub $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset 128\n" \ - "3:\tcallq __lll_unlock_wake\n" \ - "4:\tadd $128, %%" RSP_LP "\n" \ - ".cfi_adjust_cfa_offset -128\n" \ - "24:" \ - : "=m" (futex), "=&D" (ignore) \ - : "i" (FUTEX_WAITERS), "m" (futex), \ - "S" (private) \ - : "ax", "cx", "r11", "cc", "memory"); \ - } \ - while (0) - #define lll_islocked(futex) \ (futex != LLL_LOCK_INITIALIZER) @@ -323,12 +248,7 @@ extern int __lll_timedwait_tid (int *, const struct timespec *) ({ \ int __result = 0; \ if ((tid) != 0) \ - { \ - if ((abstime)->tv_nsec < 0 || (abstime)->tv_nsec >= 1000000000) \ - __result = EINVAL; \ - else \ - __result = __lll_timedwait_tid (&(tid), (abstime)); \ - } \ + __result = __lll_timedwait_tid (&(tid), (abstime)); \ __result; }) extern int __lll_lock_elision (int *futex, short *adapt_count, int private) |