ARGOBOTS
abti_config.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_CONFIG_H_INCLUDED
7 #define ABTI_CONFIG_H_INCLUDED
8 
9 /* Inlined functions for Config */
10 
11 static inline ABTI_sched_config *
12 ABTI_sched_config_get_ptr(ABT_sched_config config)
13 {
14 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
15  ABTI_sched_config *p_config;
16  if (config == ABT_SCHED_CONFIG_NULL) {
17  p_config = NULL;
18  } else {
19  p_config = (ABTI_sched_config *)config;
20  }
21  return p_config;
22 #else
23  return (ABTI_sched_config *)config;
24 #endif
25 }
26 
27 static inline ABT_sched_config
28 ABTI_sched_config_get_handle(ABTI_sched_config *p_config)
29 {
30 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
31  ABT_sched_config h_config;
32  if (p_config == NULL) {
33  h_config = ABT_SCHED_CONFIG_NULL;
34  } else {
35  h_config = (ABT_sched_config)p_config;
36  }
37  return h_config;
38 #else
39  return (ABT_sched_config)p_config;
40 #endif
41 }
42 
43 #endif /* ABTI_CONFIG_H_INCLUDED */
struct ABT_sched_config_opaque * ABT_sched_config
Definition: abt.h:259
#define ABT_SCHED_CONFIG_NULL
Definition: abt.h:340