new file mode 100644
@@ -0,0 +1,19 @@
+#include <bits/wordsize.h>
+
+/* These values are based on internal generic types from
+ sysdeps/nptl/internaltypes.h, sysdeps/nptl/bits/mutex-internal.h,
+ sysdeps/nptl/bits/rwlock-internal.h, and
+ sysdeps/nptl/bits/thread-shared-types.h */
+#if __WORDSIZE == 64
+# define __PTHREAD_MUTEX_NUSERS_OFFSET 12
+# define __PTHREAD_MUTEX_KIND_OFFSET 16
+# define __PTHREAD_MUTEX_SPINS_OFFSET 20
+# define __PTHREAD_MUTEX_ELISION_OFFSET 22
+# define __PTHREAD_MUTEX_LIST_OFFSET 24
+#else
+# define __PTHREAD_MUTEX_NUSERS_OFFSET 12
+# define __PTHREAD_MUTEX_KIND_OFFSET 16
+# define __PTHREAD_MUTEX_SPINS_OFFSET 20
+# define __PTHREAD_MUTEX_ELISION_OFFSET 22
+# define __PTHREAD_MUTEX_LIST_OFFSET 24
+#endif
This patch adds a default pthread-offsets.h based on default thread definitions from mutex-internal.h, rwlock-internal.h, thread-shared-types.h, and pthreadtypes.h. The idea is to simpify new ports inclusion. * sysdeps/nptl/pthread-offsets.h: New file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> --- ChangeLog | 2 ++ sysdeps/nptl/pthread-offsets.h | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 sysdeps/nptl/pthread-offsets.h -- 2.7.4