ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
6 #ifndef THREAD_QUEUE_H_INCLUDED
7 #define THREAD_QUEUE_H_INCLUDED
73 p_thread->
p_prev = p_thread;
74 p_thread->
p_next = p_thread;
75 p_queue->
p_head = p_thread;
76 p_queue->
p_tail = p_thread;
86 p_queue->
p_head = p_thread;
96 p_thread->
p_prev = p_thread;
97 p_thread->
p_next = p_thread;
98 p_queue->
p_head = p_thread;
99 p_queue->
p_tail = p_thread;
105 p_tail->
p_next = p_thread;
106 p_head->
p_prev = p_thread;
107 p_thread->
p_prev = p_tail;
108 p_thread->
p_next = p_head;
109 p_queue->
p_tail = p_thread;
180 if (p_thread == p_queue->
p_head) {
182 }
else if (p_thread == p_queue->
p_tail) {
199 while (num_threads--) {
202 print_fn(arg, thread);
203 p_thread = p_thread->
p_next;
int ABT_bool
Boolean type.
static void thread_queue_free(thread_queue_t *p_queue)
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
#define ABT_ERR_POOL
Error code: error related to a pool.
static ABTU_ret_err int thread_queue_acquire_spinlock_if_not_empty(thread_queue_t *p_queue, ABTD_spinlock *p_lock)
static ABT_thread ABTI_thread_get_handle(ABTI_thread *p_thread)
static void ABTD_atomic_relaxed_store_int(ABTD_atomic_int *ptr, int val)
#define ABTI_ASSERT(cond)
ABTD_atomic_int is_in_pool
static ABT_bool ABTD_spinlock_try_acquire(ABTD_spinlock *p_lock)
#define ABT_SUCCESS
Error code: the routine returns successfully.
static ABT_bool thread_queue_is_empty(const thread_queue_t *p_queue)
static ABTI_thread * thread_queue_pop_tail(thread_queue_t *p_queue)
static int ABTD_atomic_acquire_load_int(const ABTD_atomic_int *ptr)
static ABTU_ret_err int thread_queue_remove(thread_queue_t *p_queue, ABTI_thread *p_thread)
#define ABT_TRUE
True constant for ABT_bool.
#define ABT_FALSE
False constant for ABT_bool.
static void thread_queue_push_tail(thread_queue_t *p_queue, ABTI_thread *p_thread)
#define ABTI_CHECK_TRUE(cond, abt_errno)
static ABT_bool ABTD_spinlock_is_locked(const ABTD_spinlock *p_lock)
static ABTI_thread * thread_queue_pop_head(thread_queue_t *p_queue)
static void thread_queue_print_all(const thread_queue_t *p_queue, void *arg, void(*print_fn)(void *, ABT_thread))
static void thread_queue_push_head(thread_queue_t *p_queue, ABTI_thread *p_thread)
static void ABTD_atomic_release_store_int(ABTD_atomic_int *ptr, int val)
static void thread_queue_init(thread_queue_t *p_queue)
static size_t thread_queue_get_size(const thread_queue_t *p_queue)