ARGOBOTS  29b0d4cc91ca184a8278ddf690fd0bcb2119000e
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
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 */
struct ABTI_native_thread_id_opaque * ABTI_native_thread_id
Definition: abti.h:136
struct ABTI_local ABTI_local
Definition: abti.h:101
ABTI_thread * p_thread
Definition: abti.h:251
static void * ABTI_local_get_local_ptr(void)
Definition: abti_local.h:69
struct ABTI_thread_id_opaque * ABTI_thread_id
Definition: abti.h:139
#define ABTI_IS_EXT_THREAD_ENABLED
Definition: abti.h:28
static ABTI_native_thread_id ABTI_self_get_native_thread_id(ABTI_local *p_local)
Definition: abti_self.h:10
static ABTI_thread_id ABTI_self_get_thread_id(ABTI_local *p_local)
Definition: abti_self.h:22
static ABTI_xstream * ABTI_local_get_xstream_or_null(ABTI_local *p_local)
Definition: abti_local.h:77