Lines Matching refs:thread
42 void z_move_thread_to_end_of_prio_q(struct k_thread *thread);
43 int z_is_thread_time_slicing(struct k_thread *thread);
44 void z_unpend_thread_no_timeout(struct k_thread *thread);
49 void z_pend_thread(struct k_thread *thread, _wait_q_t *wait_q,
54 void z_unpend_thread(struct k_thread *thread);
56 void z_thread_priority_set(struct k_thread *thread, int prio);
57 bool z_set_prio(struct k_thread *thread, int prio);
62 void z_sched_abort(struct k_thread *thread);
64 void z_sched_start(struct k_thread *thread);
65 void z_ready_thread(struct k_thread *thread);
68 void z_thread_abort(struct k_thread *thread);
85 static inline bool z_is_idle_thread_object(struct k_thread *thread) in z_is_idle_thread_object() argument
89 return thread->base.is_idle; in z_is_idle_thread_object()
91 return thread == &z_idle_threads[0]; in z_is_idle_thread_object()
98 static inline bool z_is_thread_suspended(struct k_thread *thread) in z_is_thread_suspended() argument
100 return (thread->base.thread_state & _THREAD_SUSPENDED) != 0U; in z_is_thread_suspended()
103 static inline bool z_is_thread_pending(struct k_thread *thread) in z_is_thread_pending() argument
105 return (thread->base.thread_state & _THREAD_PENDING) != 0U; in z_is_thread_pending()
108 static inline bool z_is_thread_prevented_from_running(struct k_thread *thread) in z_is_thread_prevented_from_running() argument
110 uint8_t state = thread->base.thread_state; in z_is_thread_prevented_from_running()
117 static inline bool z_is_thread_timeout_active(struct k_thread *thread) in z_is_thread_timeout_active() argument
119 return !z_is_inactive_timeout(&thread->base.timeout); in z_is_thread_timeout_active()
122 static inline bool z_is_thread_ready(struct k_thread *thread) in z_is_thread_ready() argument
124 return !((z_is_thread_prevented_from_running(thread)) != 0U || in z_is_thread_ready()
125 z_is_thread_timeout_active(thread)); in z_is_thread_ready()
128 static inline bool z_has_thread_started(struct k_thread *thread) in z_has_thread_started() argument
130 return (thread->base.thread_state & _THREAD_PRESTART) == 0U; in z_has_thread_started()
133 static inline bool z_is_thread_state_set(struct k_thread *thread, uint32_t state) in z_is_thread_state_set() argument
135 return (thread->base.thread_state & state) != 0U; in z_is_thread_state_set()
138 static inline bool z_is_thread_queued(struct k_thread *thread) in z_is_thread_queued() argument
140 return z_is_thread_state_set(thread, _THREAD_QUEUED); in z_is_thread_queued()
143 static inline void z_mark_thread_as_suspended(struct k_thread *thread) in z_mark_thread_as_suspended() argument
145 thread->base.thread_state |= _THREAD_SUSPENDED; in z_mark_thread_as_suspended()
147 SYS_PORT_TRACING_FUNC(k_thread, sched_suspend, thread); in z_mark_thread_as_suspended()
150 static inline void z_mark_thread_as_not_suspended(struct k_thread *thread) in z_mark_thread_as_not_suspended() argument
152 thread->base.thread_state &= ~_THREAD_SUSPENDED; in z_mark_thread_as_not_suspended()
154 SYS_PORT_TRACING_FUNC(k_thread, sched_resume, thread); in z_mark_thread_as_not_suspended()
157 static inline void z_mark_thread_as_started(struct k_thread *thread) in z_mark_thread_as_started() argument
159 thread->base.thread_state &= ~_THREAD_PRESTART; in z_mark_thread_as_started()
162 static inline void z_mark_thread_as_pending(struct k_thread *thread) in z_mark_thread_as_pending() argument
164 thread->base.thread_state |= _THREAD_PENDING; in z_mark_thread_as_pending()
167 static inline void z_mark_thread_as_not_pending(struct k_thread *thread) in z_mark_thread_as_not_pending() argument
169 thread->base.thread_state &= ~_THREAD_PENDING; in z_mark_thread_as_not_pending()
172 static inline void z_set_thread_states(struct k_thread *thread, uint32_t states) in z_set_thread_states() argument
174 thread->base.thread_state |= states; in z_set_thread_states()
177 static inline void z_reset_thread_states(struct k_thread *thread, in z_reset_thread_states() argument
180 thread->base.thread_state &= ~states; in z_reset_thread_states()
246 struct k_thread *thread = z_unpend_first_thread(wq); in _ready_one_thread() local
248 if (thread != NULL) { in _ready_one_thread()
249 z_ready_thread(thread); in _ready_one_thread()
321 void z_sched_wake_thread(struct k_thread *thread, bool is_timeout);
411 void z_sched_usage_start(struct k_thread *thread);
421 void z_sched_thread_usage(struct k_thread *thread,
424 static inline void z_sched_usage_switch(struct k_thread *thread) in z_sched_usage_switch() argument
426 ARG_UNUSED(thread); in z_sched_usage_switch()
429 z_sched_usage_start(thread); in z_sched_usage_switch()