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) {
113 if (p_waitlist->
p_head == NULL) {
114 p_waitlist->
p_head = &thread;
120 p_waitlist->
p_tail = &thread;
129 if (cur_time >= target_time) {
139 #ifdef ABT_CONFIG_ACTIVE_WAIT_POLICY
144 if (cur_time >= target_time) {
152 if (cur_time >= target_time) {
163 target_time - cur_time);
184 if (p_waitlist->
p_head == &thread) {
193 p_waitlist->
p_tail = NULL;
232 #ifndef ABT_CONFIG_ACTIVE_WAIT_POLICY
241 p_waitlist->
p_head = p_next;
243 p_waitlist->
p_tail = NULL;
270 p_waitlist->
p_head = NULL;
271 p_waitlist->
p_tail = NULL;
272 #ifndef ABT_CONFIG_ACTIVE_WAIT_POLICY
273 if (wakeup_nonyieldable) {
278 (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)
#define ABTI_THREAD_TYPE_EXT
static ABT_bool ABTI_waitlist_is_empty(ABTI_waitlist *p_waitlist)
@ ABT_THREAD_STATE_BLOCKED
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 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)
void ABTI_ythread_set_blocked(ABTI_ythread *p_ythread)
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.
void ABTI_ythread_set_ready(ABTI_local *p_local, ABTI_ythread *p_ythread)
void ABTI_ythread_suspend(ABTI_xstream **pp_local_xstream, ABTI_ythread *p_ythread, ABT_sync_event_type sync_event_type, void *p_sync)
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)
static void ABTI_ythread_yield(ABTI_xstream **pp_local_xstream, ABTI_ythread *p_ythread, ABT_sync_event_type sync_event_type, void *p_sync)
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)