Browse Source

or1k: Fix tls value passed during clone

From or1k-glibc from blueCmd, his commit "Fix TLS, removed too much in
rebase".

Signed-off-by: Stafford Horne <shorne@gmail.com>
Stafford Horne 6 years ago
parent
commit
b654d10d32
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libpthread/nptl/sysdeps/unix/sysv/linux/or1k/createthread.c

+ 2 - 2
libpthread/nptl/sysdeps/unix/sysv/linux/or1k/createthread.c

@@ -16,8 +16,8 @@
    not, see <http://www.gnu.org/licenses/>.  */
 
 /* Value passed to 'clone' for initialization of the thread register.  */
-#define TLS_VALUE (pd + 1)
-
+#define TLS_VALUE ((void *) (pd) \
+		   + TLS_PRE_TCB_SIZE + TLS_INIT_TCB_SIZE)
 
 /* Get the real implementation.  */
 #include <sysdeps/pthread/createthread.c>