ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
abti_thread_attr.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_THREAD_ATTR_H_INCLUDED
7 #define ABTI_THREAD_ATTR_H_INCLUDED
8 
9 /* Inlined functions for ULT Attributes */
10 
12 {
13 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
14  ABTI_thread_attr *p_attr;
15  if (attr == ABT_THREAD_ATTR_NULL) {
16  p_attr = NULL;
17  } else {
18  p_attr = (ABTI_thread_attr *)attr;
19  }
20  return p_attr;
21 #else
22  return (ABTI_thread_attr *)attr;
23 #endif
24 }
25 
26 static inline ABT_thread_attr
28 {
29 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
30  ABT_thread_attr h_attr;
31  if (p_attr == NULL) {
32  h_attr = ABT_THREAD_ATTR_NULL;
33  } else {
34  h_attr = (ABT_thread_attr)p_attr;
35  }
36  return h_attr;
37 #else
38  return (ABT_thread_attr)p_attr;
39 #endif
40 }
41 
42 static inline void ABTI_thread_attr_init(ABTI_thread_attr *p_attr,
43  void *p_stack, size_t stacksize,
44  ABT_bool migratable)
45 {
46  p_attr->p_stack = p_stack;
47  p_attr->stacksize = stacksize;
48 #ifndef ABT_CONFIG_DISABLE_MIGRATION
49  p_attr->migratable = migratable;
50  p_attr->f_cb = NULL;
51  p_attr->p_cb_arg = NULL;
52 #endif
53 }
54 
55 #endif /* ABTI_THREAD_ATTR_H_INCLUDED */
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:1043
ABT_thread_attr
struct ABT_thread_attr_opaque * ABT_thread_attr
ULT attribute handle type.
Definition: abt.h:939
ABTI_thread_attr::migratable
ABT_bool migratable
Definition: abti.h:443
ABTI_thread_attr_get_handle
static ABT_thread_attr ABTI_thread_attr_get_handle(ABTI_thread_attr *p_attr)
Definition: abti_thread_attr.h:27
ABTI_thread_attr_get_ptr
static ABTI_thread_attr * ABTI_thread_attr_get_ptr(ABT_thread_attr attr)
Definition: abti_thread_attr.h:11
ABTI_thread_attr
Definition: abti.h:439
ABTI_thread_attr_init
static void ABTI_thread_attr_init(ABTI_thread_attr *p_attr, void *p_stack, size_t stacksize, ABT_bool migratable)
Definition: abti_thread_attr.h:42
ABTI_thread_attr::p_cb_arg
void * p_cb_arg
Definition: abti.h:445
ABT_THREAD_ATTR_NULL
#define ABT_THREAD_ATTR_NULL
Definition: abt.h:1106
ABTI_thread_attr::stacksize
size_t stacksize
Definition: abti.h:441
ABTI_thread_attr::p_stack
void * p_stack
Definition: abti.h:440
ABTI_thread_attr::f_cb
void(* f_cb)(ABT_thread, void *)
Definition: abti.h:444