1 1.1 christos /* $NetBSD: lwp_private.h,v 1.1 2024/11/30 01:04:09 christos Exp $ */ 2 1.1 christos 3 1.1 christos #ifndef _HPPA_LWP_PRIVATE_H_ 4 1.1 christos #define _HPPA_LWP_PRIVATE_H_ 5 1.1 christos 6 1.1 christos #include <sys/cdefs.h> 7 1.1 christos #include <sys/tls.h> 8 1.1 christos 9 1.1 christos __BEGIN_DECLS 10 1.1 christos static __inline void * 11 1.1 christos __lwp_getprivate_fast(void) 12 1.1 christos { 13 1.1 christos register void *__tmp; 14 1.1 christos 15 1.1 christos __asm volatile("mfctl\t27 /* CR_TLS */, %0" : "=r" (__tmp)); 16 1.1 christos 17 1.1 christos return __tmp; 18 1.1 christos } 19 1.1 christos __END_DECLS 20 1.1 christos 21 1.1 christos #endif /* _HPPA_LWP_PRIVATE_H_ */ 22