Skip to content

Commit 4118ed1

Browse files
yeraboluioannisg
authored andcommitted
kernel: sched: removing dead code
Due to the recent changes to scheduler z_find_first_thread_to_unpend & z_remove_thread_from_ready_q are not used anymore. So removing the dead code. fixes: #32691 Signed-off-by: Spoorthy Priya Yerabolu <[email protected]>
1 parent 6d10db3 commit 4118ed1

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

kernel/include/ksched.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ BUILD_ASSERT(K_LOWEST_APPLICATION_THREAD_PRIO
3838

3939
void z_sched_init(void);
4040
void z_move_thread_to_end_of_prio_q(struct k_thread *thread);
41-
void z_remove_thread_from_ready_q(struct k_thread *thread);
4241
int z_is_thread_time_slicing(struct k_thread *thread);
4342
void z_unpend_thread_no_timeout(struct k_thread *thread);
4443
struct k_thread *z_unpend1_no_timeout(_wait_q_t *wait_q);
@@ -55,8 +54,6 @@ int z_unpend_all(_wait_q_t *wait_q);
5554
void z_thread_priority_set(struct k_thread *thread, int prio);
5655
bool z_set_prio(struct k_thread *thread, int prio);
5756
void *z_get_next_switch_handle(void *interrupted);
58-
struct k_thread *z_find_first_thread_to_unpend(_wait_q_t *wait_q,
59-
struct k_thread *from);
6057
void idle(void *a, void *b, void *c);
6158
void z_time_slice(int ticks);
6259
void z_reset_time_slice(void);

kernel/sched.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -595,13 +595,6 @@ static void unready_thread(struct k_thread *thread)
595595
update_cache(thread == _current);
596596
}
597597

598-
void z_remove_thread_from_ready_q(struct k_thread *thread)
599-
{
600-
LOCKED(&sched_spinlock) {
601-
unready_thread(thread);
602-
}
603-
}
604-
605598
/* sched_spinlock must be held */
606599
static void add_to_waitq_locked(struct k_thread *thread, _wait_q_t *wait_q)
607600
{
@@ -643,20 +636,6 @@ void z_pend_thread(struct k_thread *thread, _wait_q_t *wait_q,
643636
pend(thread, wait_q, timeout);
644637
}
645638

646-
ALWAYS_INLINE struct k_thread *z_find_first_thread_to_unpend(_wait_q_t *wait_q,
647-
struct k_thread *from)
648-
{
649-
ARG_UNUSED(from);
650-
651-
struct k_thread *ret = NULL;
652-
653-
LOCKED(&sched_spinlock) {
654-
ret = _priq_wait_best(&wait_q->waitq);
655-
}
656-
657-
return ret;
658-
}
659-
660639
static inline void unpend_thread_no_timeout(struct k_thread *thread)
661640
{
662641
_priq_wait_remove(&pended_on(thread)->waitq, thread);

0 commit comments

Comments
 (0)