Skip to content

Commit

Permalink
kernel: Inline halt_thread() and z_thread_halt()
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Mitsis <[email protected]>
  • Loading branch information
peter-mitsis committed Nov 20, 2024
1 parent 5084945 commit 735f935
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct k_spinlock _sched_spinlock;
__incoherent struct k_thread _thread_dummy;

static ALWAYS_INLINE void update_cache(int preempt_ok);
static void halt_thread(struct k_thread *thread, uint8_t new_state);
static ALWAYS_INLINE void halt_thread(struct k_thread *thread, uint8_t new_state);
static void add_to_waitq_locked(struct k_thread *thread, _wait_q_t *wait_q);


Expand Down Expand Up @@ -411,8 +411,8 @@ static void thread_halt_spin(struct k_thread *thread, k_spinlock_key_t key)
* (aborting _current will not return, obviously), which may be after
* a context switch.
*/
static void z_thread_halt(struct k_thread *thread, k_spinlock_key_t key,
bool terminate)
static ALWAYS_INLINE void z_thread_halt(struct k_thread *thread, k_spinlock_key_t key,
bool terminate)
{
_wait_q_t *wq = &thread->join_queue;
#ifdef CONFIG_SMP
Expand Down Expand Up @@ -1243,7 +1243,7 @@ extern void thread_abort_hook(struct k_thread *thread);
* @param thread Identify the thread to halt
* @param new_state New thread state (_THREAD_DEAD or _THREAD_SUSPENDED)
*/
static void halt_thread(struct k_thread *thread, uint8_t new_state)
static ALWAYS_INLINE void halt_thread(struct k_thread *thread, uint8_t new_state)
{
bool dummify = false;

Expand Down

0 comments on commit 735f935

Please sign in to comment.