6 #ifndef ABTI_SELF_H_INCLUDED
7 #define ABTI_SELF_H_INCLUDED
9 static inline ABTI_native_thread_id
10 ABTI_self_get_native_thread_id(ABTI_local *p_local)
12 ABTI_xstream *p_local_xstream = ABTI_local_get_xstream_or_null(p_local);
14 if (ABTI_IS_EXT_THREAD_ENABLED && p_local_xstream == NULL) {
17 return (ABTI_native_thread_id)ABTI_local_get_local_ptr();
19 return (ABTI_native_thread_id)p_local_xstream;
22 static inline ABTI_thread_id ABTI_self_get_thread_id(ABTI_local *p_local)
24 ABTI_xstream *p_local_xstream = ABTI_local_get_xstream_or_null(p_local);
26 if (ABTI_IS_EXT_THREAD_ENABLED && p_local_xstream == NULL) {
29 return (ABTI_thread_id)ABTI_local_get_local_ptr();
31 return (ABTI_thread_id)p_local_xstream->p_thread;