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 12a5a8a commit f683c61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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,7 +411,7 @@ 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,
static ALWAYS_INLINE void z_thread_halt(struct k_thread *thread, k_spinlock_key_t key,
bool terminate)
{

Check notice on line 416 in kernel/sched.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

kernel/sched.c:416 - bool terminate) + bool terminate)
_wait_q_t *wq = &thread->join_queue;
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 f683c61

Please sign in to comment.