ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
6 #ifndef ABTI_MUTEX_H_INCLUDED
7 #define ABTI_MUTEX_H_INCLUDED
11 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
26 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
28 if (p_mutex == NULL) {
42 #ifndef ABT_CONFIG_USE_SIMPLE_MUTEX
53 #ifndef ABT_CONFIG_USE_SIMPLE_MUTEX
61 #ifndef ABT_CONFIG_USE_SIMPLE_MUTEX
176 #ifndef ABT_CONFIG_USE_SIMPLE_MUTEX
static ABTI_mutex * ABTI_mutex_get_ptr(ABT_mutex mutex)
int ABT_bool
Boolean type.
static void ABTI_mutex_unlock_no_recursion(ABTI_local *p_local, ABTI_mutex *p_mutex)
static ABT_bool ABTI_mutex_is_locked(ABTI_mutex *p_mutex)
static void ABTI_mutex_lock(ABTI_local **pp_local, ABTI_mutex *p_mutex)
static void ABTI_waitlist_broadcast(ABTI_local *p_local, ABTI_waitlist *p_waitlist)
static void ABTI_mutex_fini(ABTI_mutex *p_mutex)
@ ABTI_YTHREAD_YIELD_KIND_YIELD_LOOP
#define ABTI_MUTEX_ATTR_RECURSIVE
struct ABT_mutex_opaque * ABT_mutex
Mutex handle type.
static void ABTI_mutex_unlock(ABTI_local *p_local, ABTI_mutex *p_mutex)
static ABTI_ythread * ABTI_thread_get_ythread_or_null(ABTI_thread *p_thread)
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
ABTD_spinlock waiter_lock
#define ABTI_ASSERT(cond)
static ABT_bool ABTD_spinlock_try_acquire(ABTD_spinlock *p_lock)
#define ABT_SUCCESS
Error code: the routine returns successfully.
struct ABTI_thread_id_opaque * ABTI_thread_id
static void ABTI_mutex_lock_no_recursion(ABTI_local **pp_local, ABTI_mutex *p_mutex)
static void ABTI_ythread_yield(ABTI_xstream **pp_local_xstream, ABTI_ythread *p_self, ABTI_ythread_yield_kind kind, ABT_sync_event_type sync_event_type, void *p_sync)
static ABTI_xstream * ABTI_local_get_xstream_or_null(ABTI_local *p_local)
#define ABTI_IS_EXT_THREAD_ENABLED
static int ABTI_mutex_trylock_no_recursion(ABTI_mutex *p_mutex)
static ABTI_local * ABTI_xstream_get_local(ABTI_xstream *p_xstream)
static void ABTI_mutex_spinlock_no_recursion(ABTI_mutex *p_mutex)
static void ABTD_spinlock_clear(ABTD_spinlock *p_lock)
static ABTI_thread_id ABTI_self_get_thread_id(ABTI_local *p_local)
#define ABTI_MUTEX_ATTR_NONE
static void ABTI_mutex_spinlock(ABTI_local *p_local, ABTI_mutex *p_mutex)
static void ABTD_spinlock_release(ABTD_spinlock *p_lock)
#define ABT_ERR_MUTEX_LOCKED
Error code: a return value when a mutex is locked.
static int ABTI_mutex_trylock(ABTI_local *p_local, ABTI_mutex *p_mutex)
struct ABTI_local ABTI_local
static void ABTI_waitlist_init(ABTI_waitlist *p_waitlist)
static ABT_bool ABTD_spinlock_is_locked(const ABTD_spinlock *p_lock)
static void ABTI_mutex_init(ABTI_mutex *p_mutex)
static void ABTI_waitlist_wait_and_unlock(ABTI_local **pp_local, ABTI_waitlist *p_waitlist, ABTD_spinlock *p_lock, ABT_sync_event_type sync_event_type, void *p_sync)
static ABT_mutex ABTI_mutex_get_handle(ABTI_mutex *p_mutex)