Lines Matching full:thread

44 static ALWAYS_INLINE void z_priq_mq_add(struct _priq_mq *pq, struct k_thread *thread);
45 static ALWAYS_INLINE void z_priq_mq_remove(struct _priq_mq *pq, struct k_thread *thread);
60 static ALWAYS_INLINE void z_priq_dumb_remove(sys_dlist_t *pq, struct k_thread *thread) in z_priq_dumb_remove() argument
64 sys_dlist_remove(&thread->base.qnode_dlist); in z_priq_dumb_remove()
69 struct k_thread *thread = NULL; in z_priq_dumb_best() local
73 thread = CONTAINER_OF(n, struct k_thread, base.qnode_dlist); in z_priq_dumb_best()
75 return thread; in z_priq_dumb_best()
78 static ALWAYS_INLINE void z_priq_rb_add(struct _priq_rb *pq, struct k_thread *thread) in z_priq_rb_add() argument
82 thread->base.order_key = pq->next_order_key; in z_priq_rb_add()
98 rb_insert(&pq->tree, &thread->base.qnode_rb); in z_priq_rb_add()
101 static ALWAYS_INLINE void z_priq_rb_remove(struct _priq_rb *pq, struct k_thread *thread) in z_priq_rb_remove() argument
103 rb_remove(&pq->tree, &thread->base.qnode_rb); in z_priq_rb_remove()
112 struct k_thread *thread = NULL; in z_priq_rb_best() local
116 thread = CONTAINER_OF(n, struct k_thread, base.qnode_rb); in z_priq_rb_best()
118 return thread; in z_priq_rb_best()
123 struct k_thread *thread = NULL; in z_priq_mq_best() local
138 thread = CONTAINER_OF(n, struct k_thread, base.qnode_dlist); in z_priq_mq_best()
143 return thread; in z_priq_mq_best()
167 struct k_thread *thread) in z_priq_mq_add() argument
169 struct prio_info pos = get_prio_info(thread->base.prio); in z_priq_mq_add()
171 sys_dlist_append(&pq->queues[pos.offset_prio], &thread->base.qnode_dlist); in z_priq_mq_add()
176 struct k_thread *thread) in z_priq_mq_remove() argument
178 struct prio_info pos = get_prio_info(thread->base.prio); in z_priq_mq_remove()
180 sys_dlist_remove(&thread->base.qnode_dlist); in z_priq_mq_remove()
195 struct k_thread *thread; in z_priq_dumb_mask_best() local
197 SYS_DLIST_FOR_EACH_CONTAINER(pq, thread, base.qnode_dlist) { in z_priq_dumb_mask_best()
198 if ((thread->base.cpu_mask & BIT(_current_cpu->id)) != 0) { in z_priq_dumb_mask_best()
199 return thread; in z_priq_dumb_mask_best()
209 struct k_thread *thread) in z_priq_dumb_add() argument
214 if (z_sched_prio_cmp(thread, t) > 0) { in z_priq_dumb_add()
216 &thread->base.qnode_dlist); in z_priq_dumb_add()
221 sys_dlist_append(pq, &thread->base.qnode_dlist); in z_priq_dumb_add()