1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

thread: Zombification is NORETURN when called from threads

This commit is contained in:
chrysn 2023-01-25 15:18:34 +01:00
parent 4d8d745ab8
commit 833de50e2b
2 changed files with 5 additions and 0 deletions

View File

@ -356,6 +356,9 @@ THREAD_MAYBE_INLINE void thread_yield_higher(void);
* but its scheduler entry and stack will be kept.
* A zombie state thread is supposed to be cleaned up
* by @ref thread_kill_zombie().
*
* This function would be NORETURN, but its no-op behavior inside an
* ISR precludes such an annotation.
*/
void thread_zombify(void);

View File

@ -320,6 +320,8 @@ NORETURN void sched_task_exit(void)
sched_num_threads--;
thread_zombify();
/* We're in a thread, so thread_zombify is really NORETURN. */
UNREACHABLE();
}
#ifdef MODULE_SCHED_CB