diff --git a/arch/8051/src/up_exit.c b/arch/8051/src/up_exit.c index 235eb691fb..9ef2732944 100644 --- a/arch/8051/src/up_exit.c +++ b/arch/8051/src/up_exit.c @@ -45,6 +45,7 @@ #include <8052.h> #include +#include "task/task.h" #include "os_internal.h" #include "up_internal.h" diff --git a/arch/arm/src/common/up_exit.c b/arch/arm/src/common/up_exit.c index 37b603e505..70358184d9 100644 --- a/arch/arm/src/common/up_exit.c +++ b/arch/arm/src/common/up_exit.c @@ -43,13 +43,14 @@ #include #include -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/arch/avr/src/common/up_exit.c b/arch/avr/src/common/up_exit.c index 355163359e..db422b410d 100644 --- a/arch/avr/src/common/up_exit.c +++ b/arch/avr/src/common/up_exit.c @@ -43,13 +43,14 @@ #include #include -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/arch/hc/src/common/up_exit.c b/arch/hc/src/common/up_exit.c index 7fa526ff72..1e8bdca2e8 100644 --- a/arch/hc/src/common/up_exit.c +++ b/arch/hc/src/common/up_exit.c @@ -43,13 +43,14 @@ #include #include -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/arch/mips/src/common/up_exit.c b/arch/mips/src/common/up_exit.c index 415ca64eee..585a667a7c 100644 --- a/arch/mips/src/common/up_exit.c +++ b/arch/mips/src/common/up_exit.c @@ -45,13 +45,14 @@ #include #include -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/arch/rgmp/src/nuttx.c b/arch/rgmp/src/nuttx.c index 0178ae58af..2b20cad648 100644 --- a/arch/rgmp/src/nuttx.c +++ b/arch/rgmp/src/nuttx.c @@ -52,11 +52,12 @@ #include #include #include -#include + +#include "task/task.h" +#include "os_internal.h" struct tcb_s *current_task = NULL; - /** * This function is called in non-interrupt context * to switch tasks. diff --git a/arch/sh/src/common/up_exit.c b/arch/sh/src/common/up_exit.c index d4669caf47..bdb1c520e9 100644 --- a/arch/sh/src/common/up_exit.c +++ b/arch/sh/src/common/up_exit.c @@ -44,13 +44,14 @@ #include -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Private Definitions ****************************************************************************/ diff --git a/arch/sim/src/up_exit.c b/arch/sim/src/up_exit.c index f4c91e544a..b70a911545 100644 --- a/arch/sim/src/up_exit.c +++ b/arch/sim/src/up_exit.c @@ -44,6 +44,7 @@ #include +#include "task/task.h" #include "os_internal.h" #include "up_internal.h" diff --git a/arch/x86/src/common/up_exit.c b/arch/x86/src/common/up_exit.c index ad1ec41c61..bf2548214b 100644 --- a/arch/x86/src/common/up_exit.c +++ b/arch/x86/src/common/up_exit.c @@ -43,13 +43,14 @@ #include #include -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/arch/z16/src/common/up_exit.c b/arch/z16/src/common/up_exit.c index c578a3bfed..99d50bab83 100644 --- a/arch/z16/src/common/up_exit.c +++ b/arch/z16/src/common/up_exit.c @@ -44,14 +44,15 @@ #include -#include "chip/chip.h" -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "chip/chip.h" +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Private Definitions ****************************************************************************/ diff --git a/arch/z80/src/common/up_exit.c b/arch/z80/src/common/up_exit.c index 50d675f96e..124ee10354 100644 --- a/arch/z80/src/common/up_exit.c +++ b/arch/z80/src/common/up_exit.c @@ -45,14 +45,15 @@ #include -#include "chip/chip.h" -#include "os_internal.h" -#include "up_internal.h" - #ifdef CONFIG_DUMP_ON_EXIT #include #endif +#include "chip/chip.h" +#include "task/task.h" +#include "os_internal.h" +#include "up_internal.h" + /**************************************************************************** * Private Definitions ****************************************************************************/ diff --git a/sched/Makefile b/sched/Makefile index 563983aac8..c1dade9754 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -40,31 +40,10 @@ DEPPATH = --dep-path . ASRCS = -TSK_SRCS = prctl.c exit.c getpid.c -TSK_SRCS += task_create.c task_init.c task_setup.c task_activate.c task_start.c -TSK_SRCS += task_delete.c task_exit.c task_exithook.c task_recover.c -TSK_SRCS += task_restart.c task_spawn.c task_spawnparms.c task_terminate.c -TSK_SRCS += sched_addreadytorun.c sched_removereadytorun.c sched_addprioritized.c -TSK_SRCS += sched_mergepending.c sched_addblocked.c sched_removeblocked.c -TSK_SRCS += sched_free.c sched_gettcb.c sched_verifytcb.c sched_releasetcb.c - -ifeq ($(CONFIG_ARCH_HAVE_VFORK),y) -ifeq ($(CONFIG_SCHED_WAITPID),y) -TSK_SRCS += task_vfork.c -endif -endif - -ifneq ($(CONFIG_BINFMT_DISABLE),y) -ifeq ($(CONFIG_LIBC_EXECFUNCS),y) -TSK_SRCS += task_posixspawn.c -endif -endif - -ifeq ($(CONFIG_SCHED_STARTHOOK),y) -TSK_SRCS += task_starthook.c -endif - SCHED_SRCS = sched_garbage.c sched_getfiles.c +SCHED_SRCS += sched_addreadytorun.c sched_removereadytorun.c sched_addprioritized.c +SCHED_SRCS += sched_mergepending.c sched_addblocked.c sched_removeblocked.c +SCHED_SRCS += sched_free.c sched_gettcb.c sched_verifytcb.c sched_releasetcb.c SCHED_SRCS += sched_getsockets.c sched_getstreams.c SCHED_SRCS += sched_setparam.c sched_setpriority.c sched_getparam.c SCHED_SRCS += sched_setscheduler.c sched_getscheduler.c @@ -108,6 +87,7 @@ include init/Make.defs include irq/Make.defs include paging/Make.defs include group/Make.defs +include task/Make.defs include errno/Make.defs include wdog/Make.defs include semaphore/Make.defs @@ -118,8 +98,11 @@ include clock/Make.defs include timer/Make.defs include environ/Make.defs -CSRCS = $(INIT_SRCS) $(IRQ_SRCS) $(PG_SRCS) $(GRP_SRCS) $(TSK_SRCS) -CSRCS += $(SCHED_SRCS) $(ERRNO_SRCS) $(WDOG_SRCS) $(SEM_SRCS) +# REVISIT +TSK_SRCS += prctl.c exit.c getpid.c + +CSRCS = $(INIT_SRCS) $(IRQ_SRCS) $(PG_SRCS) $(GRP_SRCS) $(SCHED_SRCS) +CSRCS += $(TSK_SRCS) $(ERRNO_SRCS) $(WDOG_SRCS) $(SEM_SRCS) CSRCS += $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(CLOCK_SRCS) CSRCS += $(TIMER_SRCS) $(ENV_SRCS) diff --git a/sched/exit.c b/sched/exit.c index b88c84ec3c..db922d89f0 100644 --- a/sched/exit.c +++ b/sched/exit.c @@ -46,10 +46,11 @@ #include +#include "task/task.h" #include "os_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** diff --git a/sched/group/Make.defs b/sched/group/Make.defs index b389055cf8..b884365473 100644 --- a/sched/group/Make.defs +++ b/sched/group/Make.defs @@ -35,7 +35,7 @@ GRP_SRCS = group_create.c group_join.c group_leave.c group_find.c GRP_SRCS += group_setupstreams.c group_setupidlefiles.c group_setuptaskfiles.c -GRP_SRCS += task_getgroup.c group_foreachchild.c group_killchildren.c +GRP_SRCS += group_foreachchild.c group_killchildren.c ifeq ($(CONFIG_SCHED_HAVE_PARENT),y) GRP_SRCS += task_reparent.c diff --git a/sched/group/group.h b/sched/group/group.h index 96ebe231d0..a15919070d 100644 --- a/sched/group/group.h +++ b/sched/group/group.h @@ -75,6 +75,11 @@ extern FAR struct task_group_s *g_grouphead; /**************************************************************************** * Public Function Prototypes ****************************************************************************/ + +#ifdef CONFIG_SCHED_CHILD_STATUS +void weak_function task_initialize(void); +#endif + /* Task group data structure management */ #ifdef HAVE_TASK_GROUP diff --git a/sched/init/init.h b/sched/init/init.h index b52920a5c9..d3f3ae9132 100644 --- a/sched/init/init.h +++ b/sched/init/init.h @@ -42,13 +42,6 @@ #include -#include -#include -#include -#include - -#include - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/sched/os_internal.h b/sched/os_internal.h index 6ce7a97579..9307fb3136 100644 --- a/sched/os_internal.h +++ b/sched/os_internal.h @@ -219,18 +219,6 @@ extern volatile uint32_t g_cpuload_total; * Public Function Prototypes ****************************************************************************/ -#ifdef CONFIG_SCHED_CHILD_STATUS -void weak_function task_initialize(void); -#endif -void task_start(void); -int task_schedsetup(FAR struct task_tcb_s *tcb, int priority, - start_t start, main_t main, uint8_t ttype); -int task_argsetup(FAR struct task_tcb_s *tcb, FAR const char *name, - FAR char * const argv[]); -int task_exit(void); -int task_terminate(pid_t pid, bool nonblocking); -void task_exithook(FAR struct tcb_s *tcb, int status, bool nonblocking); -void task_recover(FAR struct tcb_s *tcb); bool sched_addreadytorun(FAR struct tcb_s *rtrtcb); bool sched_removereadytorun(FAR struct tcb_s *rtrtcb); bool sched_addprioritized(FAR struct tcb_s *newTcb, DSEG dq_queue_t *list); diff --git a/sched/pthread/pthread_exit.c b/sched/pthread/pthread_exit.c index 3ca5362f72..ebc7fb2621 100644 --- a/sched/pthread/pthread_exit.c +++ b/sched/pthread/pthread_exit.c @@ -50,6 +50,7 @@ #include #include "os_internal.h" +#include "task/task.h" #include "pthread/pthread.h" /************************************************************************ diff --git a/sched/task/Make.defs b/sched/task/Make.defs new file mode 100644 index 0000000000..0d979e5014 --- /dev/null +++ b/sched/task/Make.defs @@ -0,0 +1,60 @@ +############################################################################ +# sched/task/Make.defs +# +# Copyright (C) 2014 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +TSK_SRCS = task_create.c task_init.c task_setup.c task_activate.c +TSK_SRCS += task_start.c task_delete.c task_exit.c task_exithook.c +TSK_SRCS += task_recover.c task_restart.c task_spawn.c task_spawnparms.c +TSK_SRCS += task_terminate.c task_getgroup.c + +ifeq ($(CONFIG_ARCH_HAVE_VFORK),y) +ifeq ($(CONFIG_SCHED_WAITPID),y) +TSK_SRCS += task_vfork.c +endif +endif + +ifneq ($(CONFIG_BINFMT_DISABLE),y) +ifeq ($(CONFIG_LIBC_EXECFUNCS),y) +TSK_SRCS += task_posixspawn.c +endif +endif + +ifeq ($(CONFIG_SCHED_STARTHOOK),y) +TSK_SRCS += task_starthook.c +endif + +# Include task build support + +DEPPATH += --dep-path task +VPATH += :task diff --git a/sched/spawn_internal.h b/sched/task/spawn.h similarity index 97% rename from sched/spawn_internal.h rename to sched/task/spawn.h index 89021226a3..1e44f035ac 100644 --- a/sched/spawn_internal.h +++ b/sched/task/spawn.h @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/spawn_internal.h + * sched/task/spawn.h * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __SCHED_SPAWN_INERNAL_H -#define __SCHED_SPAWN_INERNAL_H +#ifndef __SCHED_TASK_SPAWN_H +#define __SCHED_TASK_SPAWN_H /**************************************************************************** * Included Files @@ -159,4 +159,4 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr); int spawn_proxyattrs(FAR const posix_spawnattr_t *attr, FAR const posix_spawn_file_actions_t *file_actions); -#endif /* __SCHED_SPAWN_INERNAL_H */ +#endif /* __SCHED_TASK_SPAWN_H */ diff --git a/sched/task/task.h b/sched/task/task.h new file mode 100644 index 0000000000..a748877f78 --- /dev/null +++ b/sched/task/task.h @@ -0,0 +1,77 @@ +/**************************************************************************** + * sched/task/task.h + * + * Copyright (C) 2007-2014 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __SCHED_TASK_TASK_H +#define __SCHED_TASK_TASK_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Type Definitions + ****************************************************************************/ + +/**************************************************************************** + * Global Variables + ****************************************************************************/ +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +void task_start(void); +int task_schedsetup(FAR struct task_tcb_s *tcb, int priority, + start_t start, main_t main, uint8_t ttype); +int task_argsetup(FAR struct task_tcb_s *tcb, FAR const char *name, + FAR char * const argv[]); +int task_exit(void); +int task_terminate(pid_t pid, bool nonblocking); +void task_exithook(FAR struct tcb_s *tcb, int status, bool nonblocking); +void task_recover(FAR struct tcb_s *tcb); +bool sched_addreadytorun(FAR struct tcb_s *rtrtcb); + +#endif /* __SCHED_TASK_TASK_H */ diff --git a/sched/task_activate.c b/sched/task/task_activate.c similarity index 99% rename from sched/task_activate.c rename to sched/task/task_activate.c index c4449464c3..2b11e54262 100644 --- a/sched/task_activate.c +++ b/sched/task/task_activate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_activate.c + * sched/task/task_activate.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/task_create.c b/sched/task/task_create.c similarity index 99% rename from sched/task_create.c rename to sched/task/task_create.c index 55fdf22a6b..d6663e45cc 100644 --- a/sched/task_create.c +++ b/sched/task/task_create.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_create.c + * sched/task/task_create.c * * Copyright (C) 2007-2010, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,6 +50,7 @@ #include "os_internal.h" #include "group/group.h" +#include "task/task.h" /**************************************************************************** * Definitions diff --git a/sched/task_delete.c b/sched/task/task_delete.c similarity index 99% rename from sched/task_delete.c rename to sched/task/task_delete.c index ead1811c3f..bdae892089 100644 --- a/sched/task_delete.c +++ b/sched/task/task_delete.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_delete.c + * sched/task/task_delete.c * * Copyright (C) 2007-2009, 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,6 +44,7 @@ #include #include "os_internal.h" +#include "task/task.h" /**************************************************************************** * Definitions diff --git a/sched/task_exit.c b/sched/task/task_exit.c similarity index 99% rename from sched/task_exit.c rename to sched/task/task_exit.c index 4bcdc189c5..838eac4602 100644 --- a/sched/task_exit.c +++ b/sched/task/task_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_exit.c + * sched/task/task_exit.c * * Copyright (C) 2008-2009, 2012-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -40,10 +40,13 @@ #include #include + #include "os_internal.h" + #ifndef CONFIG_DISABLE_SIGNALS # include "signal/signal.h" #endif +#include "task/task.h" /**************************************************************************** * Definitions diff --git a/sched/task_exithook.c b/sched/task/task_exithook.c similarity index 99% rename from sched/task_exithook.c rename to sched/task/task_exithook.c index 90056c2646..7d086c52e5 100644 --- a/sched/task_exithook.c +++ b/sched/task/task_exithook.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_exithook.c + * sched/task/task_exithook.c * * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,6 +51,7 @@ #include "os_internal.h" #include "group/group.h" #include "signal/signal.h" +#include "task/task.h" /**************************************************************************** * Pre-processor Definitions diff --git a/sched/task_getgroup.c b/sched/task/task_getgroup.c similarity index 98% rename from sched/task_getgroup.c rename to sched/task/task_getgroup.c index 9c7b4b954e..abb3e23c51 100644 --- a/sched/task_getgroup.c +++ b/sched/task/task_getgroup.c @@ -1,5 +1,5 @@ /***************************************************************************** - * sched/task_getgroup.c + * sched/task/task_getgroup.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,6 +43,7 @@ #include "os_internal.h" #include "group/group.h" +#include "task/task.h" #ifdef HAVE_TASK_GROUP diff --git a/sched/task_init.c b/sched/task/task_init.c similarity index 99% rename from sched/task_init.c rename to sched/task/task_init.c index 112ac6801e..a0ff9e7503 100644 --- a/sched/task_init.c +++ b/sched/task/task_init.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_init.c + * sched/task/task_init.c * * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,6 +48,7 @@ #include "os_internal.h" #include "group/group.h" +#include "task/task.h" /**************************************************************************** * Definitions diff --git a/sched/task_posixspawn.c b/sched/task/task_posixspawn.c similarity index 99% rename from sched/task_posixspawn.c rename to sched/task/task_posixspawn.c index 122a83a28e..9d4f8f9a35 100644 --- a/sched/task_posixspawn.c +++ b/sched/task/task_posixspawn.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_posixspawn.c + * sched/task/task_posixspawn.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,7 +47,8 @@ #include "os_internal.h" #include "group/group.h" -#include "spawn_internal.h" +#include "task/spawn.h" +#include "task/task.h" /**************************************************************************** * Private Types diff --git a/sched/task_recover.c b/sched/task/task_recover.c similarity index 98% rename from sched/task_recover.c rename to sched/task/task_recover.c index 1907a9fe49..76ac236bd1 100644 --- a/sched/task_recover.c +++ b/sched/task/task_recover.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_recover.c + * sched/task/task_recover.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,6 +46,7 @@ #include "os_internal.h" #include "mqueue/mqueue.h" +#include "task/task.h" /**************************************************************************** * Definitions diff --git a/sched/task_reparent.c b/sched/task/task_reparent.c similarity index 99% rename from sched/task_reparent.c rename to sched/task/task_reparent.c index 7f8c8de413..81a449bad3 100644 --- a/sched/task_reparent.c +++ b/sched/task/task_reparent.c @@ -1,5 +1,5 @@ /***************************************************************************** - * sched/task_reparent.c + * sched/task/task_reparent.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,6 +43,7 @@ #include "os_internal.h" #include "group/group.h" +#include "task/task.h" #ifdef CONFIG_SCHED_HAVE_PARENT diff --git a/sched/task_restart.c b/sched/task/task_restart.c similarity index 99% rename from sched/task_restart.c rename to sched/task/task_restart.c index 1e552030a5..dd3a78547f 100644 --- a/sched/task_restart.c +++ b/sched/task/task_restart.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_restart.c + * sched/task/task_restart.c * * Copyright (C) 2007, 2009, 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,6 +48,7 @@ #include "os_internal.h" #include "group/group.h" #include "signal/signal.h" +#include "task/task.h" /**************************************************************************** * Definitions diff --git a/sched/task_setup.c b/sched/task/task_setup.c similarity index 99% rename from sched/task_setup.c rename to sched/task/task_setup.c index ddf1537bff..89b0ec1d29 100644 --- a/sched/task_setup.c +++ b/sched/task/task_setup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_setup.c + * sched/task/task_setup.c * * Copyright (C) 2007-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,9 +51,10 @@ #include "os_internal.h" #include "pthread/pthread.h" #include "group/group.h" +#include "task/task.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** diff --git a/sched/task_spawn.c b/sched/task/task_spawn.c similarity index 99% rename from sched/task_spawn.c rename to sched/task/task_spawn.c index 541c62b11d..7678455fab 100644 --- a/sched/task_spawn.c +++ b/sched/task/task_spawn.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_spawn.c + * sched/task/task_spawn.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,7 +46,8 @@ #include "os_internal.h" #include "group/group.h" -#include "spawn_internal.h" +#include "task/spawn.h" +#include "task/task.h" /**************************************************************************** * Pre-processor Definitions diff --git a/sched/task_spawnparms.c b/sched/task/task_spawnparms.c similarity index 99% rename from sched/task_spawnparms.c rename to sched/task/task_spawnparms.c index 25cb865310..7a8cad6c48 100644 --- a/sched/task_spawnparms.c +++ b/sched/task/task_spawnparms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_spawnparms.c + * sched/task/task_spawnparms.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,7 +46,8 @@ #include -#include "spawn_internal.h" +#include "task/spawn.h" +#include "task/task.h" /**************************************************************************** * Private Types diff --git a/sched/task_start.c b/sched/task/task_start.c similarity index 99% rename from sched/task_start.c rename to sched/task/task_start.c index e9667d486f..653e2794a9 100644 --- a/sched/task_start.c +++ b/sched/task/task_start.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_start.c + * sched/task/task_start.c * * Copyright (C) 2007-2010, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,6 +47,7 @@ #include #include "os_internal.h" +#include "task/task.h" /**************************************************************************** * Pre-processor Definitions diff --git a/sched/task_starthook.c b/sched/task/task_starthook.c similarity index 98% rename from sched/task_starthook.c rename to sched/task/task_starthook.c index 7fa0757aa1..dcfb4fca99 100644 --- a/sched/task_starthook.c +++ b/sched/task/task_starthook.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_starthook.c + * sched/task/task_starthook.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -41,6 +41,8 @@ #include +#include "task/task.h" + #ifdef CONFIG_SCHED_STARTHOOK /**************************************************************************** diff --git a/sched/task_terminate.c b/sched/task/task_terminate.c similarity index 99% rename from sched/task_terminate.c rename to sched/task/task_terminate.c index 11438d22d0..4c41e51e43 100644 --- a/sched/task_terminate.c +++ b/sched/task/task_terminate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_terminate.c + * sched/task/task_terminate.c * * Copyright (C) 2007-2009, 2011-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,6 +51,7 @@ #ifndef CONFIG_DISABLE_SIGNALS # include "signal/signal.h" #endif +#include "task/task.h" /**************************************************************************** * Definitions diff --git a/sched/task_vfork.c b/sched/task/task_vfork.c similarity index 99% rename from sched/task_vfork.c rename to sched/task/task_vfork.c index 706ef864dd..9636339647 100644 --- a/sched/task_vfork.c +++ b/sched/task/task_vfork.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/task_vfork + * sched/task/task_vfork * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,6 +50,7 @@ #include "os_internal.h" #include "group/group.h" +#include "task/task.h" /**************************************************************************** * Pre-processor Definitions