summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/microblaze/tcb-offsets.sym
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-31 18:05:44 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-03 20:37:48 +0100
commit191739597c6d380692885cfdd8dd8aa4f31f029d (patch)
treeb3f05ce72f7a87433905698dd58371048c904812 /libpthread/nptl/sysdeps/microblaze/tcb-offsets.sym
parent7825930078208462655e107677656c45014e91b4 (diff)
microblaze: add NPTL/TLS support from GNU libc
Not perfect, but a starting point. Some tests of the test suite are failing.
Diffstat (limited to 'libpthread/nptl/sysdeps/microblaze/tcb-offsets.sym')
-rw-r--r--libpthread/nptl/sysdeps/microblaze/tcb-offsets.sym11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpthread/nptl/sysdeps/microblaze/tcb-offsets.sym b/libpthread/nptl/sysdeps/microblaze/tcb-offsets.sym
new file mode 100644
index 000000000..18afbee29
--- /dev/null
+++ b/libpthread/nptl/sysdeps/microblaze/tcb-offsets.sym
@@ -0,0 +1,11 @@
+#include <sysdep.h>
+#include <tls.h>
+
+--
+
+-- Abuse tls.h macros to derive offsets relative to the thread register.
+#define thread_offsetof(mem) (long)(offsetof (struct pthread, mem) - sizeof (struct pthread))
+
+MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
+PID_OFFSET thread_offsetof (pid)
+TID_OFFSET thread_offsetof (tid)