ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
6 #ifndef ABTI_WAITLIST_H_INCLUDED
7 #define ABTI_WAITLIST_H_INCLUDED
13 #ifndef ABT_CONFIG_ACTIVE_WAIT_POLICY
39 if (p_waitlist->
p_head == NULL) {
40 p_waitlist->
p_head = &thread;
44 p_waitlist->
p_tail = &thread;
47 #ifdef ABT_CONFIG_ACTIVE_WAIT_POLICY
75 if (p_waitlist->
p_head == NULL) {
84 sync_event_type, p_sync);
111 if (p_waitlist->
p_head == NULL) {
112 p_waitlist->
p_head = &thread;
118 p_waitlist->
p_tail = &thread;
127 if (cur_time >= target_time) {
133 sync_event_type, p_sync);
138 #ifdef ABT_CONFIG_ACTIVE_WAIT_POLICY
143 if (cur_time >= target_time) {
151 if (cur_time >= target_time) {
162 target_time - cur_time);
183 if (p_waitlist->
p_head == &thread) {
192 p_waitlist->
p_tail = NULL;
231 #ifndef ABT_CONFIG_ACTIVE_WAIT_POLICY
240 p_waitlist->
p_head = p_next;
242 p_waitlist->
p_tail = NULL;
269 p_waitlist->
p_head = NULL;
270 p_waitlist->
p_tail = NULL;
271 #ifndef ABT_CONFIG_ACTIVE_WAIT_POLICY
272 if (wakeup_nonyieldable) {
277 (void)wakeup_nonyieldable;
ABTD_futex_multiple futex
int ABT_bool
Boolean type.
static ABT_bool ABTI_waitlist_wait_timedout_and_unlock(ABTI_local **pp_local, ABTI_waitlist *p_waitlist, ABTD_spinlock *p_lock, double target_time, ABT_sync_event_type sync_event_type, void *p_sync)
static void ABTI_waitlist_broadcast(ABTI_local *p_local, ABTI_waitlist *p_waitlist)
static void ABTD_futex_multiple_init(ABTD_futex_multiple *p_futex)
@ ABTI_YTHREAD_YIELD_KIND_YIELD_LOOP
#define ABTI_THREAD_TYPE_EXT
static ABT_bool ABTI_waitlist_is_empty(ABTI_waitlist *p_waitlist)
@ ABT_THREAD_STATE_BLOCKED
static void ABTI_ythread_suspend_unlock(ABTI_xstream **pp_local_xstream, ABTI_ythread *p_self, ABTD_spinlock *p_lock, ABT_sync_event_type sync_event_type, void *p_sync)
static int ABTD_atomic_relaxed_load_int(const ABTD_atomic_int *ptr)
static ABTI_ythread * ABTI_thread_get_ythread_or_null(ABTI_thread *p_thread)
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
static void ABTI_ythread_resume_and_push(ABTI_local *p_local, ABTI_ythread *p_ythread)
static void ABTD_atomic_relaxed_store_int(ABTD_atomic_int *ptr, int val)
#define ABTI_ASSERT(cond)
void ABTD_futex_wait_and_unlock(ABTD_futex_multiple *p_futex, ABTD_spinlock *p_lock)
static int ABTD_atomic_acquire_load_int(const ABTD_atomic_int *ptr)
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 ABTI_local * ABTI_xstream_get_local(ABTI_xstream *p_xstream)
#define ABT_TRUE
True constant for ABT_bool.
#define ABT_FALSE
False constant for ABT_bool.
static void ABTD_spinlock_release(ABTD_spinlock *p_lock)
struct ABTI_local ABTI_local
void ABTD_futex_timedwait_and_unlock(ABTD_futex_multiple *p_futex, ABTD_spinlock *p_lock, double wait_time_sec)
void ABTD_futex_broadcast(ABTD_futex_multiple *p_futex)
static void ABTI_waitlist_init(ABTI_waitlist *p_waitlist)
static ABT_bool ABTD_spinlock_is_locked(const ABTD_spinlock *p_lock)
static void ABTI_waitlist_signal(ABTI_local *p_local, ABTI_waitlist *p_waitlist)
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 void ABTD_atomic_release_store_int(ABTD_atomic_int *ptr, int val)
static double ABTI_get_wtime(void)