ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
abti_self.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  * See COPYRIGHT in top-level directory.
4  */
5 
6 #ifndef ABTI_SELF_H_INCLUDED
7 #define ABTI_SELF_H_INCLUDED
8 
9 static inline ABTI_native_thread_id
11 {
12  ABTI_xstream *p_local_xstream = ABTI_local_get_xstream_or_null(p_local);
13  /* This is when an external thread called this routine. */
14  if (ABTI_IS_EXT_THREAD_ENABLED && p_local_xstream == NULL) {
15  /* A pointer to a thread local variable can distinguish all external
16  * threads and execution streams. */
18  }
19  return (ABTI_native_thread_id)p_local_xstream;
20 }
21 
23 {
24  ABTI_xstream *p_local_xstream = ABTI_local_get_xstream_or_null(p_local);
25  /* This is when an external thread called this routine. */
26  if (ABTI_IS_EXT_THREAD_ENABLED && p_local_xstream == NULL) {
27  /* A pointer to a thread local variable is unique to an external thread
28  * and its value is different from pointers to ULTs and tasks. */
30  }
31  return (ABTI_thread_id)p_local_xstream->p_thread;
32 }
33 
34 #endif /* ABTI_SELF_H_INCLUDED */
ABTI_xstream
Definition: abti.h:294
ABTI_self_get_native_thread_id
static ABTI_native_thread_id ABTI_self_get_native_thread_id(ABTI_local *p_local)
Definition: abti_self.h:10
ABTI_thread_id
struct ABTI_thread_id_opaque * ABTI_thread_id
Definition: abti.h:175
ABTI_local_get_xstream_or_null
static ABTI_xstream * ABTI_local_get_xstream_or_null(ABTI_local *p_local)
Definition: abti_local.h:77
ABTI_IS_EXT_THREAD_ENABLED
#define ABTI_IS_EXT_THREAD_ENABLED
Definition: abti.h:28
ABTI_self_get_thread_id
static ABTI_thread_id ABTI_self_get_thread_id(ABTI_local *p_local)
Definition: abti_self.h:22
ABTI_local_get_local_ptr
static void * ABTI_local_get_local_ptr(void)
Definition: abti_local.h:69
ABTI_local
struct ABTI_local ABTI_local
Definition: abti.h:132
ABTI_native_thread_id
struct ABTI_native_thread_id_opaque * ABTI_native_thread_id
Definition: abti.h:172