ARGOBOTS  66b1c39742507d8df30e8d28c54839b961a14814
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
abti_barrier.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_BARRIER_H_INCLUDED
7 #define ABTI_BARRIER_H_INCLUDED
8 
9 /* Inlined functions for Barrier */
10 
11 /* Barrier */
12 static inline ABTI_barrier *ABTI_barrier_get_ptr(ABT_barrier barrier)
13 {
14 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
15  ABTI_barrier *p_barrier;
16  if (barrier == ABT_BARRIER_NULL) {
17  p_barrier = NULL;
18  } else {
19  p_barrier = (ABTI_barrier *)barrier;
20  }
21  return p_barrier;
22 #else
23  return (ABTI_barrier *)barrier;
24 #endif
25 }
26 
27 static inline ABT_barrier ABTI_barrier_get_handle(ABTI_barrier *p_barrier)
28 {
29 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
30  ABT_barrier h_barrier;
31  if (p_barrier == NULL) {
32  h_barrier = ABT_BARRIER_NULL;
33  } else {
34  h_barrier = (ABT_barrier)p_barrier;
35  }
36  return h_barrier;
37 #else
38  return (ABT_barrier)p_barrier;
39 #endif
40 }
41 
42 #endif /* ABTI_BARRIER_H_INCLUDED */
struct ABT_barrier_opaque * ABT_barrier
Definition: abt.h:369
#define ABT_BARRIER_NULL
Definition: abt.h:425