[glibc] nptl: add missing pthread-offsets.h

Andreas Schwab schwab@sourceware.org
Mon Feb 10 16:04:00 GMT 2020


https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4970c9e0b58773566a4073852c239f3662cec0aa

commit 4970c9e0b58773566a4073852c239f3662cec0aa
Author: Andreas Schwab <schwab@suse.de>
Date:   Wed Feb 5 18:09:04 2020 +0100

    nptl: add missing pthread-offsets.h
    
    All architectures using their own definition of struct
    __pthread_rwlock_arch_t need to provide their own pthread-offsets.h.

Diff:
---
 sysdeps/aarch64/nptl/pthread-offsets.h |  3 +++
 sysdeps/alpha/nptl/pthread-offsets.h   |  3 +++
 sysdeps/ia64/nptl/pthread-offsets.h    |  3 +++
 sysdeps/riscv/nptl/pthread-offsets.h   |  3 +++
 sysdeps/sparc/nptl/pthread-offsets.h   | 13 +++++++++++++
 5 files changed, 25 insertions(+)

diff --git a/sysdeps/aarch64/nptl/pthread-offsets.h b/sysdeps/aarch64/nptl/pthread-offsets.h
new file mode 100644
index 0000000..31f0587
--- /dev/null
+++ b/sysdeps/aarch64/nptl/pthread-offsets.h
@@ -0,0 +1,3 @@
+#define __PTHREAD_MUTEX_KIND_OFFSET		16
+
+#define __PTHREAD_RWLOCK_FLAGS_OFFSET		48
diff --git a/sysdeps/alpha/nptl/pthread-offsets.h b/sysdeps/alpha/nptl/pthread-offsets.h
new file mode 100644
index 0000000..31f0587
--- /dev/null
+++ b/sysdeps/alpha/nptl/pthread-offsets.h
@@ -0,0 +1,3 @@
+#define __PTHREAD_MUTEX_KIND_OFFSET		16
+
+#define __PTHREAD_RWLOCK_FLAGS_OFFSET		48
diff --git a/sysdeps/ia64/nptl/pthread-offsets.h b/sysdeps/ia64/nptl/pthread-offsets.h
new file mode 100644
index 0000000..31f0587
--- /dev/null
+++ b/sysdeps/ia64/nptl/pthread-offsets.h
@@ -0,0 +1,3 @@
+#define __PTHREAD_MUTEX_KIND_OFFSET		16
+
+#define __PTHREAD_RWLOCK_FLAGS_OFFSET		48
diff --git a/sysdeps/riscv/nptl/pthread-offsets.h b/sysdeps/riscv/nptl/pthread-offsets.h
new file mode 100644
index 0000000..31f0587
--- /dev/null
+++ b/sysdeps/riscv/nptl/pthread-offsets.h
@@ -0,0 +1,3 @@
+#define __PTHREAD_MUTEX_KIND_OFFSET		16
+
+#define __PTHREAD_RWLOCK_FLAGS_OFFSET		48
diff --git a/sysdeps/sparc/nptl/pthread-offsets.h b/sysdeps/sparc/nptl/pthread-offsets.h
new file mode 100644
index 0000000..ac50a5a
--- /dev/null
+++ b/sysdeps/sparc/nptl/pthread-offsets.h
@@ -0,0 +1,13 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
+# define __PTHREAD_MUTEX_KIND_OFFSET		16
+#else
+# define __PTHREAD_MUTEX_KIND_OFFSET		12
+#endif
+
+#if __WORDSIZE == 64
+# define __PTHREAD_RWLOCK_FLAGS_OFFSET		48
+#else
+# define __PTHREAD_RWLOCK_FLAGS_OFFSET		27
+#endif



More information about the Glibc-cvs mailing list