DASH  0.3.0
dart_synchronization.h
Go to the documentation of this file.
1 #ifndef DART_SYNCHRONIZATION_H_INCLUDED
2 #define DART_SYNCHRONIZATION_H_INCLUDED
3 
13 #include <dash/dart/if/dart_util.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
21 #define DART_INTERFACE_ON
22 
30 typedef struct dart_lock_struct *dart_lock_t;
31 
36 #define DART_LOCK_NULL ((dart_lock_t)NULL)
37 
50  dart_team_t teamid,
51  dart_lock_t * lock) DART_NOTHROW;
52 
64  dart_lock_t * lock) DART_NOTHROW;
65 
81  dart_lock_t lock) DART_NOTHROW;
82 
100  dart_lock_t lock,
101  int32_t * result) DART_NOTHROW;
102 
114  dart_lock_t lock) DART_NOTHROW;
115 
126  struct dart_lock_struct const *lock) DART_NOTHROW;
127 
129 #define DART_INTERFACE_OFF
130 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif /* DART_SYNCHRONIZATION_H_INCLUDED */
dart_ret_t dart_team_lock_init(dart_team_t teamid, dart_lock_t *lock)
Collective operation to initialize the lock object.
bool dart_lock_initialized(struct dart_lock_struct const *lock)
Whether the lock has been properly initialized.
dart_ret_t dart_lock_try_acquire(dart_lock_t lock, int32_t *result)
Try to acquire the lock and return immediately.
struct dart_lock_struct * dart_lock_t
Lock type to ensure mutual exclusion among units in a team.
dart_ret_t dart_team_lock_destroy(dart_lock_t *lock)
Collective operation to destroy a lock initialized using dart_team_lock_init.
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30
int16_t dart_team_t
Data type for storing a team ID.
Definition: dart_types.h:252
dart_ret_t dart_lock_release(dart_lock_t lock)
Release the lock acquired through dart_lock_acquire or dart_lock_try_acquire.
dart_ret_t dart_lock_acquire(dart_lock_t lock)
Block until the lock was acquired.