ARGOBOTS  7496202f85916e93d6d143320764c2aba5026d93
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
abti_stream_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_XSTREAM_BARRIER_H_INCLUDED
7 #define ABTI_XSTREAM_BARRIER_H_INCLUDED
8 
9 #ifdef HAVE_PTHREAD_BARRIER_INIT
10 static inline ABTI_xstream_barrier *
11 ABTI_xstream_barrier_get_ptr(ABT_xstream_barrier barrier)
12 {
13 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
14  ABTI_xstream_barrier *p_barrier;
15  if (barrier == ABT_XSTREAM_BARRIER_NULL) {
16  p_barrier = NULL;
17  } else {
18  p_barrier = (ABTI_xstream_barrier *)barrier;
19  }
20  return p_barrier;
21 #else
22  return (ABTI_xstream_barrier *)barrier;
23 #endif
24 }
25 
26 static inline ABT_xstream_barrier
27 ABTI_xstream_barrier_get_handle(ABTI_xstream_barrier *p_barrier)
28 {
29 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
30  ABT_xstream_barrier h_barrier;
31  if (p_barrier == NULL) {
32  h_barrier = ABT_XSTREAM_BARRIER_NULL;
33  } else {
34  h_barrier = (ABT_xstream_barrier)p_barrier;
35  }
36  return h_barrier;
37 #else
38  return (ABT_xstream_barrier)p_barrier;
39 #endif
40 }
41 #endif
42 
43 #endif /* ABTI_XSTREAM_BARRIER_H_INCLUDED */
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Definition: abt.h:317
#define ABT_XSTREAM_BARRIER_NULL
Definition: abt.h:410