From ce2eec56c3845ce70259e2af936d1e816c3763da Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 19 Apr 2024 12:45:13 +0300 Subject: Switch x86 NPTL impl to generic C code. The asm code has high maintainance cost. The cost is extremely high if we take into consideration time64 implementation which implies operating with 64bit numbers on 32bit system. Also glibc uses mainly C in NPTL code. Signed-off-by: Dmitry Chestnykh --- .../nptl/sysdeps/unix/sysv/linux/lowlevellock.h | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h') diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h index 6ecc23e25..99025fdf3 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h @@ -17,17 +17,6 @@ #ifndef _LOWLEVELLOCK_H #define _LOWLEVELLOCK_H 1 -#include -#include -#include -#include -#include -#include - -#if defined(__UCLIBC_USE_TIME64__) -#include "internal/time64_helpers.h" -#endif - #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 #define FUTEX_REQUEUE 3 @@ -44,6 +33,19 @@ #define FUTEX_BITSET_MATCH_ANY 0xffffffff +#ifndef __ASSEMBLER__ + +#include +#include +#include +#include +#include +#include + +#if defined(__UCLIBC_USE_TIME64__) +#include "internal/time64_helpers.h" +#endif + /* Values for 'private' parameter of locking macros. Yes, the definition seems to be backwards. But it is not. The bit will be reversed before passing to the system call. */ @@ -337,4 +339,6 @@ extern int __lll_timedwait_tid (int *, const struct timespec *) __res; \ }) +#endif /* __ASSEMBLER__ */ + #endif /* lowlevellock.h */ -- cgit v1.2.3