ARGOBOTS
abti_future.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_FUTURE_H_INCLUDED
7 #define ABTI_FUTURE_H_INCLUDED
8 
9 /* Inlined functions for Future */
10 
11 static inline ABTI_future *ABTI_future_get_ptr(ABT_future future)
12 {
13 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
14  ABTI_future *p_future;
15  if (future == ABT_FUTURE_NULL) {
16  p_future = NULL;
17  } else {
18  p_future = (ABTI_future *)future;
19  }
20  return p_future;
21 #else
22  return (ABTI_future *)future;
23 #endif
24 }
25 
26 static inline ABT_future ABTI_future_get_handle(ABTI_future *p_future)
27 {
28 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
29  ABT_future h_future;
30  if (p_future == NULL) {
31  h_future = ABT_FUTURE_NULL;
32  } else {
33  h_future = (ABT_future)p_future;
34  }
35  return h_future;
36 #else
37  return (ABT_future)p_future;
38 #endif
39 }
40 
41 #endif /* ABTI_FUTURE_H_INCLUDED */
#define ABT_FUTURE_NULL
Definition: abt.h:353
struct ABT_future_opaque * ABT_future
Definition: abt.h:303