Lines Matching refs:k_thread

28 extern struct k_thread *pending_current;
36 __incoherent struct k_thread _thread_dummy;
39 static ALWAYS_INLINE void halt_thread(struct k_thread *thread, uint8_t new_state);
40 static void add_to_waitq_locked(struct k_thread *thread, _wait_q_t *wait_q);
48 static ALWAYS_INLINE void *thread_runq(struct k_thread *thread) in thread_runq()
77 static ALWAYS_INLINE void runq_add(struct k_thread *thread) in runq_add()
84 static ALWAYS_INLINE void runq_remove(struct k_thread *thread) in runq_remove()
96 static ALWAYS_INLINE struct k_thread *runq_best(void) in runq_best()
104 static inline bool should_queue_thread(struct k_thread *thread) in should_queue_thread()
109 static ALWAYS_INLINE void queue_thread(struct k_thread *thread) in queue_thread()
123 static ALWAYS_INLINE void dequeue_thread(struct k_thread *thread) in dequeue_thread()
137 void z_requeue_current(struct k_thread *thread) in z_requeue_current()
146 static inline bool is_aborting(struct k_thread *thread) in is_aborting()
152 static inline bool is_halting(struct k_thread *thread) in is_halting()
159 static inline void clear_halting(struct k_thread *thread) in clear_halting()
167 static ALWAYS_INLINE struct k_thread *next_up(void) in next_up()
176 struct k_thread *thread = runq_best(); in next_up()
185 struct k_thread *mirqp = _current_cpu->metairq_preempted; in next_up()
255 void move_thread_to_end_of_prio_q(struct k_thread *thread) in move_thread_to_end_of_prio_q()
268 static void update_metairq_preempt(struct k_thread *thread) in update_metairq_preempt()
291 struct k_thread *thread = next_up(); in update_cache()
316 static struct _cpu *thread_active_elsewhere(struct k_thread *thread) in thread_active_elsewhere()
338 static void ready_thread(struct k_thread *thread) in ready_thread()
348 SYS_PORT_TRACING_OBJ_FUNC(k_thread, sched_ready, thread); in ready_thread()
357 void z_ready_thread(struct k_thread *thread) in z_ready_thread()
366 void z_move_thread_to_end_of_prio_q(struct k_thread *thread) in z_move_thread_to_end_of_prio_q()
379 static void thread_halt_spin(struct k_thread *thread, k_spinlock_key_t key) in thread_halt_spin()
400 static ALWAYS_INLINE void z_thread_halt(struct k_thread *thread, k_spinlock_key_t key, in z_thread_halt()
456 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, suspend, thread); in z_impl_k_thread_suspend()
483 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_thread, suspend, thread); in z_impl_k_thread_suspend()
497 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, resume, thread); in z_impl_k_thread_resume()
512 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_thread, resume, thread); in z_impl_k_thread_resume()
524 static void unready_thread(struct k_thread *thread) in unready_thread()
533 static void add_to_waitq_locked(struct k_thread *thread, _wait_q_t *wait_q) in add_to_waitq_locked()
538 SYS_PORT_TRACING_FUNC(k_thread, sched_pend, thread); in add_to_waitq_locked()
546 static void add_thread_timeout(struct k_thread *thread, k_timeout_t timeout) in add_thread_timeout()
553 static void pend_locked(struct k_thread *thread, _wait_q_t *wait_q, in pend_locked()
563 void z_pend_thread(struct k_thread *thread, _wait_q_t *wait_q, in z_pend_thread()
572 void z_unpend_thread_no_timeout(struct k_thread *thread) in z_unpend_thread_no_timeout()
581 void z_sched_wake_thread(struct k_thread *thread, bool is_timeout) in z_sched_wake_thread()
613 struct k_thread *thread = CONTAINER_OF(timeout, in z_thread_timeout()
614 struct k_thread, base.timeout); in z_thread_timeout()
642 struct k_thread *z_unpend1_no_timeout(_wait_q_t *wait_q) in z_unpend1_no_timeout()
644 struct k_thread *thread = NULL; in z_unpend1_no_timeout()
657 void z_unpend_thread(struct k_thread *thread) in z_unpend_thread()
666 bool z_thread_prio_set(struct k_thread *thread, int prio) in z_thread_prio_set()
717 SYS_PORT_TRACING_OBJ_FUNC(k_thread, sched_priority_set, thread, prio); in z_thread_prio_set()
741 struct k_thread *new_thread; in need_swap()
772 SYS_PORT_TRACING_FUNC(k_thread, sched_lock); in k_sched_lock()
796 SYS_PORT_TRACING_FUNC(k_thread, sched_unlock); in k_sched_unlock()
801 struct k_thread *z_swap_next_thread(void) in z_swap_next_thread()
804 struct k_thread *ret = next_up(); in z_swap_next_thread()
821 static inline void set_current(struct k_thread *new_thread) in set_current()
871 struct k_thread *old_thread = _current, *new_thread; in z_get_next_switch_handle()
942 struct k_thread *thread; in z_unpend_all()
977 bool need_sched = z_thread_prio_set((struct k_thread *)thread, prio); in z_impl_k_thread_priority_set()
1007 struct k_thread *thread = tid; in z_impl_k_thread_deadline_set()
1030 struct k_thread *thread = tid; in z_vrfy_k_thread_deadline_set()
1072 SYS_PORT_TRACING_FUNC(k_thread, yield); in z_impl_k_yield()
1138 SYS_PORT_TRACING_FUNC_ENTER(k_thread, sleep, timeout); in z_impl_k_sleep()
1146 SYS_PORT_TRACING_FUNC_EXIT(k_thread, sleep, timeout, ms); in z_impl_k_sleep()
1162 SYS_PORT_TRACING_FUNC_ENTER(k_thread, usleep, us); in z_impl_k_usleep()
1169 SYS_PORT_TRACING_FUNC_EXIT(k_thread, usleep, us, ret); in z_impl_k_usleep()
1184 SYS_PORT_TRACING_OBJ_FUNC(k_thread, wakeup, thread); in z_impl_k_wakeup()
1222 struct k_thread *thread; in unpend_all()
1233 extern void thread_abort_hook(struct k_thread *thread);
1244 static ALWAYS_INLINE void halt_thread(struct k_thread *thread, uint8_t new_state) in halt_thread()
1286 SYS_PORT_TRACING_FUNC(k_thread, sched_abort, thread); in halt_thread()
1336 void z_thread_abort(struct k_thread *thread) in z_thread_abort()
1357 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, abort, thread); in z_impl_k_thread_abort()
1363 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_thread, abort, thread); in z_impl_k_thread_abort()
1367 int z_impl_k_thread_join(struct k_thread *thread, k_timeout_t timeout) in z_impl_k_thread_join()
1372 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, join, thread, timeout); in z_impl_k_thread_join()
1387 SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(k_thread, join, thread, timeout); in z_impl_k_thread_join()
1389 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_thread, join, thread, timeout, ret); in z_impl_k_thread_join()
1394 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_thread, join, thread, timeout, ret); in z_impl_k_thread_join()
1409 static bool thread_obj_validate(struct k_thread *thread) in thread_obj_validate()
1428 static inline int z_vrfy_k_thread_join(struct k_thread *thread, in z_vrfy_k_thread_join()
1448 z_impl_k_thread_abort((struct k_thread *)thread); in z_vrfy_k_thread_abort()
1458 struct k_thread *thread; in z_sched_wake()
1490 int (*func)(struct k_thread *, void *), void *data) in z_sched_waitq_walk() argument
1492 struct k_thread *thread; in z_sched_waitq_walk()
1517 void z_unready_thread(struct k_thread *thread) in z_unready_thread()