diff options
Diffstat (limited to 'hurd/hurd/threadvar.h')
-rw-r--r-- | hurd/hurd/threadvar.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h index 786db14a01..93e91ecbb5 100644 --- a/hurd/hurd/threadvar.h +++ b/hurd/hurd/threadvar.h @@ -81,6 +81,8 @@ 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 && !defined NOT_IN_libc _HURD_THREADVAR_H_EXTERN_INLINE unsigned long int * __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index, void *__sp) @@ -92,6 +94,7 @@ __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index, : (unsigned long int *) ((__stack & __hurd_threadvar_stack_mask) + __hurd_threadvar_stack_offset))[__index]; } +#endif #include <machine-sp.h> /* Define __thread_stack_pointer. */ @@ -105,12 +108,14 @@ __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 && !defined NOT_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 /* hurd/threadvar.h */ |