ARGOBOTS
abti_key.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_KEY_H_INCLUDED
7 #define ABTI_KEY_H_INCLUDED
8 
9 /* Inlined functions for Work unit-specific data key */
10 
11 static inline ABTI_key *ABTI_key_get_ptr(ABT_key key)
12 {
13 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
14  ABTI_key *p_key;
15  if (key == ABT_KEY_NULL) {
16  p_key = NULL;
17  } else {
18  p_key = (ABTI_key *)key;
19  }
20  return p_key;
21 #else
22  return (ABTI_key *)key;
23 #endif
24 }
25 
26 static inline ABT_key ABTI_key_get_handle(ABTI_key *p_key)
27 {
28 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
29  ABT_key h_key;
30  if (p_key == NULL) {
31  h_key = ABT_KEY_NULL;
32  } else {
33  h_key = (ABT_key)p_key;
34  }
35  return h_key;
36 #else
37  return (ABT_key)p_key;
38 #endif
39 }
40 
41 #endif /* ABTI_KEY_H_INCLUDED */
#define ABT_KEY_NULL
Definition: abt.h:347
struct ABT_key_opaque * ABT_key
Definition: abt.h:291