ARGOBOTS  1227c643f7a7f974f1f1778a9ffebd29d7dafecf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
abti_rwlock.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_RWLOCK_H_INCLUDED
7 #define ABTI_RWLOCK_H_INCLUDED
8 
9 #include "abti_mutex.h"
10 #include "abti_cond.h"
11 
12 /* Inlined functions for RWLock */
13 
15 {
16 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
17  ABTI_rwlock *p_rwlock;
18  if (rwlock == ABT_RWLOCK_NULL) {
19  p_rwlock = NULL;
20  } else {
21  p_rwlock = (ABTI_rwlock *)rwlock;
22  }
23  return p_rwlock;
24 #else
25  return (ABTI_rwlock *)rwlock;
26 #endif
27 }
28 
30 {
31 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
32  ABT_rwlock h_rwlock;
33  if (p_rwlock == NULL) {
34  h_rwlock = ABT_RWLOCK_NULL;
35  } else {
36  h_rwlock = (ABT_rwlock)p_rwlock;
37  }
38  return h_rwlock;
39 #else
40  return (ABT_rwlock)p_rwlock;
41 #endif
42 }
43 
44 #endif /* ABTI_RWLOCK_H_INCLUDED */
static ABT_rwlock ABTI_rwlock_get_handle(ABTI_rwlock *p_rwlock)
Definition: abti_rwlock.h:29
struct ABT_rwlock_opaque * ABT_rwlock
Definition: abt.h:363
static ABTI_rwlock * ABTI_rwlock_get_ptr(ABT_rwlock rwlock)
Definition: abti_rwlock.h:14
#define ABT_RWLOCK_NULL
Definition: abt.h:422