sched: Remove task_delete in case of CONFIG_BUILD_KERNEL

Deleting a task from another task's context will not do, so shut
this gate down for BUILD_KERNEL. In this case if a task wants another
task to terminate, it must ask the other task to politely kill itself.

Note: kthreads still need this, also, the kernel can delete a task
without asking.
This commit is contained in:
Ville Juven
2022-05-11 09:03:04 +03:00
committed by Xiang Xiao
parent c39d3fa9e4
commit b1d92159fa
4 changed files with 117 additions and 86 deletions
+2 -1
View File
@@ -92,10 +92,11 @@ SYSCALL_LOOKUP(sem_wait, 1)
#ifndef CONFIG_BUILD_KERNEL
SYSCALL_LOOKUP(task_create, 5)
SYSCALL_LOOKUP(task_spawn, 6)
SYSCALL_LOOKUP(task_delete, 1)
#else
SYSCALL_LOOKUP(pgalloc, 2)
#endif
SYSCALL_LOOKUP(task_delete, 1)
SYSCALL_LOOKUP(task_restart, 1)
SYSCALL_LOOKUP(task_setcancelstate, 2)
SYSCALL_LOOKUP(up_assert, 2)