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
+1 -1
View File
@@ -172,7 +172,7 @@
"symlink","unistd.h","defined(CONFIG_PSEUDOFS_SOFTLINKS)","int","FAR const char *","FAR const char *"
"sysinfo","sys/sysinfo.h","","int","FAR struct sysinfo *"
"task_create","sched.h","!defined(CONFIG_BUILD_KERNEL)", "int","FAR const char *","int","int","main_t","FAR char * const []|FAR char * const *"
"task_delete","sched.h","","int","pid_t"
"task_delete","sched.h","!defined(CONFIG_BUILD_KERNEL)","int","pid_t"
"task_restart","sched.h","","int","pid_t"
"task_setcancelstate","sched.h","","int","int","FAR int *"
"task_setcanceltype","sched.h","defined(CONFIG_CANCELLATION_POINTS)","int","int","FAR int *"
1 _exit unistd.h noreturn int
172 symlink unistd.h defined(CONFIG_PSEUDOFS_SOFTLINKS) int FAR const char *
173 sysinfo sys/sysinfo.h int FAR struct sysinfo *
174 task_create sched.h !defined(CONFIG_BUILD_KERNEL) int FAR const char *
175 task_delete sched.h !defined(CONFIG_BUILD_KERNEL) int pid_t
176 task_restart sched.h int pid_t
177 task_setcancelstate sched.h int int
178 task_setcanceltype sched.h defined(CONFIG_CANCELLATION_POINTS) int int