Skip to content

Commit a4a8a63

Browse files
committed
check thread type
1 parent e3ab0aa commit a4a8a63

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

kernel/sched.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,18 @@ static ALWAYS_INLINE void *curr_cpu_runq(void)
7676

7777
static ALWAYS_INLINE void runq_add(struct k_thread *thread)
7878
{
79-
__ASSERT_NO_MSG(!z_is_idle_thread_object(thread) && !thread_is_metairq(thread));
79+
__ASSERT_NO_MSG(!z_is_idle_thread_object(thread));
80+
__ASSERT_NO_MSG(!thread_is_metairq(thread));
81+
__ASSERT_NO_MSG(!is_thread_dummy(thread));
8082

8183
_priq_run_add(thread_runq(thread), thread);
8284
}
8385

8486
static ALWAYS_INLINE void runq_remove(struct k_thread *thread)
8587
{
86-
__ASSERT_NO_MSG(!z_is_idle_thread_object(thread) && !thread_is_metairq(thread));
88+
__ASSERT_NO_MSG(!z_is_idle_thread_object(thread));
89+
__ASSERT_NO_MSG(!thread_is_metairq(thread));
90+
__ASSERT_NO_MSG(!is_thread_dummy(thread));
8791

8892
_priq_run_remove(thread_runq(thread), thread);
8993
}

0 commit comments

Comments
 (0)