summaryrefslogtreecommitdiff
path: root/hurd/hurd/threadvar.h
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurd/threadvar.h')
-rw-r--r--hurd/hurd/threadvar.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
index 1727dace26..b5fc29da77 100644
--- a/hurd/hurd/threadvar.h
+++ b/hurd/hurd/threadvar.h
@@ -81,6 +81,9 @@ enum __hurd_threadvar_index
extern unsigned long int *__hurd_threadvar_location_from_sp
(enum __hurd_threadvar_index __index, void *__sp);
+
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
_HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
__hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index,
void *__sp)
@@ -92,6 +95,8 @@ __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index,
: (unsigned long int *) ((__stack & __hurd_threadvar_stack_mask) +
__hurd_threadvar_stack_offset))[__index];
}
+# endif
+#endif
#include <machine-sp.h> /* Define __thread_stack_pointer. */
@@ -105,12 +110,16 @@ __hurd_threadvar_location (enum __hurd_threadvar_index __index) __THROW
the same stack frame by different threads. */
__attribute__ ((__const__));
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
_HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
__hurd_threadvar_location (enum __hurd_threadvar_index __index)
{
return __hurd_threadvar_location_from_sp (__index,
__thread_stack_pointer ());
}
+# endif
+#endif
#endif /* hurd/threadvar.h */