ARGOBOTS  36a41b57298ad4e16b5ada8c95c81f00dfed4d3c
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 */
abti_cond.h
ABTI_rwlock
Definition: abti.h:489
ABTI_rwlock_get_ptr
static ABTI_rwlock * ABTI_rwlock_get_ptr(ABT_rwlock rwlock)
Definition: abti_rwlock.h:14
ABT_RWLOCK_NULL
#define ABT_RWLOCK_NULL
Definition: abt.h:1112
ABT_rwlock
struct ABT_rwlock_opaque * ABT_rwlock
Readers-writer lock handle type.
Definition: abt.h:1008
ABTI_rwlock_get_handle
static ABT_rwlock ABTI_rwlock_get_handle(ABTI_rwlock *p_rwlock)
Definition: abti_rwlock.h:29
abti_mutex.h