Lines Matching refs:thread
106 static ALWAYS_INLINE void z_priq_simple_add(sys_dlist_t *pq, struct k_thread *thread) in z_priq_simple_add() argument
111 if (z_sched_prio_cmp(thread, t) > 0) { in z_priq_simple_add()
112 sys_dlist_insert(&t->base.qnode_dlist, &thread->base.qnode_dlist); in z_priq_simple_add()
117 sys_dlist_append(pq, &thread->base.qnode_dlist); in z_priq_simple_add()
120 static ALWAYS_INLINE void z_priq_simple_remove(sys_dlist_t *pq, struct k_thread *thread) in z_priq_simple_remove() argument
124 sys_dlist_remove(&thread->base.qnode_dlist); in z_priq_simple_remove()
160 struct k_thread *thread = NULL; in z_priq_simple_best() local
164 thread = CONTAINER_OF(n, struct k_thread, base.qnode_dlist); in z_priq_simple_best()
166 return thread; in z_priq_simple_best()
175 struct k_thread *thread; in z_priq_simple_mask_best() local
177 SYS_DLIST_FOR_EACH_CONTAINER(pq, thread, base.qnode_dlist) { in z_priq_simple_mask_best()
178 if ((thread->base.cpu_mask & BIT(_current_cpu->id)) != 0) { in z_priq_simple_mask_best()
179 return thread; in z_priq_simple_mask_best()
198 static ALWAYS_INLINE void z_priq_rb_add(struct _priq_rb *pq, struct k_thread *thread) in z_priq_rb_add() argument
202 thread->base.order_key = pq->next_order_key; in z_priq_rb_add()
218 rb_insert(&pq->tree, &thread->base.qnode_rb); in z_priq_rb_add()
221 static ALWAYS_INLINE void z_priq_rb_remove(struct _priq_rb *pq, struct k_thread *thread) in z_priq_rb_remove() argument
223 rb_remove(&pq->tree, &thread->base.qnode_rb); in z_priq_rb_remove()
240 struct k_thread *thread = NULL; in z_priq_rb_best() local
244 thread = CONTAINER_OF(n, struct k_thread, base.qnode_rb); in z_priq_rb_best()
246 return thread; in z_priq_rb_best()
293 struct k_thread *thread) in z_priq_mq_add() argument
295 struct prio_info pos = get_prio_info(thread->base.prio); in z_priq_mq_add()
297 sys_dlist_append(&pq->queues[pos.offset_prio], &thread->base.qnode_dlist); in z_priq_mq_add()
308 struct k_thread *thread) in z_priq_mq_remove() argument
310 struct prio_info pos = get_prio_info(thread->base.prio); in z_priq_mq_remove()
312 sys_dlist_dequeue(&thread->base.qnode_dlist); in z_priq_mq_remove()