summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/arc/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps/arc/tls.h')
-rw-r--r--libpthread/nptl/sysdeps/arc/tls.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libpthread/nptl/sysdeps/arc/tls.h b/libpthread/nptl/sysdeps/arc/tls.h
index 63dd11398..4af415a1c 100644
--- a/libpthread/nptl/sysdeps/arc/tls.h
+++ b/libpthread/nptl/sysdeps/arc/tls.h
@@ -104,8 +104,11 @@ typedef struct
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp, secondcall) \
({ \
- __builtin_set_thread_pointer(tcbp); \
- NULL; \
+ long result_var; \
+ __builtin_set_thread_pointer(tcbp); \
+ result_var = INTERNAL_SYSCALL (arc_settls, err, 1, (tcbp)); \
+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ ? "unknown error" : NULL; \
})
/* Return the address of the dtv for the current thread.