diff --git a/sched/task/task_posixspawn.c b/sched/task/task_posixspawn.c index 87d86809397..a4e30f9fb83 100644 --- a/sched/task/task_posixspawn.c +++ b/sched/task/task_posixspawn.c @@ -43,6 +43,7 @@ #include #include +#include #include #include "sched/sched.h" @@ -424,10 +425,10 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path, * task. */ - proxy = task_create("posix_spawn_proxy", param.sched_priority, - CONFIG_POSIX_SPAWN_PROXY_STACKSIZE, - (main_t)posix_spawn_proxy, - (FAR char * const *)NULL); + proxy = kernel_thread("posix_spawn_proxy", param.sched_priority, + CONFIG_POSIX_SPAWN_PROXY_STACKSIZE, + (main_t)posix_spawn_proxy, + (FAR char * const *)NULL); if (proxy < 0) { ret = get_errno();