summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h
diff options
context:
space:
mode:
authorDmitry Chestnykh <dm.chestnykh@gmail.com>2024-04-19 12:45:13 +0300
committerWaldemar Brodkorb <wbx@openadk.org>2024-04-20 06:39:11 +0200
commitce2eec56c3845ce70259e2af936d1e816c3763da (patch)
treefd6ce9fe60b5e6b5465c209172d4c28be0481b6d /libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h
parent225478e84d4115205bfee73d1cf5688fdde499c8 (diff)
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 <dm.chestnykh@gmail.com>
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.h26
1 files changed, 15 insertions, 11 deletions
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 <time.h>
-#include <sys/param.h>
-#include <bits/pthreadtypes.h>
-#include <atomic.h>
-#include <sysdep.h>
-#include <bits/kernel-features.h>
-
-#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 <time.h>
+#include <sys/param.h>
+#include <bits/pthreadtypes.h>
+#include <atomic.h>
+#include <sysdep.h>
+#include <bits/kernel-features.h>
+
+#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 */