diff --git a/sched/Makefile b/sched/Makefile index c1dade97548..5a9a9f62948 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -50,14 +50,6 @@ SCHED_SRCS += sched_setscheduler.c sched_getscheduler.c SCHED_SRCS += sched_yield.c sched_rrgetinterval.c sched_foreach.c SCHED_SRCS += sched_lock.c sched_unlock.c sched_lockcount.c sched_self.c -ifeq ($(CONFIG_SCHED_ATEXIT),y) -SCHED_SRCS += atexit.c -endif - -ifeq ($(CONFIG_SCHED_ONEXIT),y) -SCHED_SRCS += on_exit.c -endif - ifeq ($(CONFIG_PRIORITY_INHERITANCE),y) SCHED_SRCS += sched_reprioritize.c endif @@ -79,10 +71,6 @@ else SCHED_SRCS += sched_processtimer.c endif -ifneq ($(CONFIG_DISABLE_SIGNALS),y) -SCHED_SRCS += nanosleep.c -endif - include init/Make.defs include irq/Make.defs include paging/Make.defs @@ -99,7 +87,7 @@ include timer/Make.defs include environ/Make.defs # REVISIT -TSK_SRCS += prctl.c exit.c getpid.c +TSK_SRCS += exit.c CSRCS = $(INIT_SRCS) $(IRQ_SRCS) $(PG_SRCS) $(GRP_SRCS) $(SCHED_SRCS) CSRCS += $(TSK_SRCS) $(ERRNO_SRCS) $(WDOG_SRCS) $(SEM_SRCS) diff --git a/sched/signal/Make.defs b/sched/signal/Make.defs index d529d0e9bfb..77cb63608c2 100644 --- a/sched/signal/Make.defs +++ b/sched/signal/Make.defs @@ -42,7 +42,7 @@ SIGNAL_SRCS += sig_findaction.c sig_allocatependingsigaction.c SIGNAL_SRCS += sig_releasependingsigaction.c sig_unmaskpendingsignal.c SIGNAL_SRCS += sig_removependingsignal.c sig_releasependingsignal.c sig_lowest.c SIGNAL_SRCS += sig_mqnotempty.c sig_cleanup.c sig_dispatch.c sig_deliver.c -SIGNAL_SRCS += sig_pause.c +SIGNAL_SRCS += sig_pause.c sig_nanosleep.c # Include signal build support diff --git a/sched/nanosleep.c b/sched/signal/sig_nanosleep.c similarity index 99% rename from sched/nanosleep.c rename to sched/signal/sig_nanosleep.c index 43414f2f232..5bdfa57c2b0 100644 --- a/sched/nanosleep.c +++ b/sched/signal/sig_nanosleep.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/nanosleep.c + * sched/signal/sig/nanosleep.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/task/Make.defs b/sched/task/Make.defs index 0d979e50147..da2f43f07e2 100644 --- a/sched/task/Make.defs +++ b/sched/task/Make.defs @@ -36,7 +36,7 @@ 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 +TSK_SRCS += task_terminate.c task_getgroup.c task_prctl.c task_getpid.c ifeq ($(CONFIG_ARCH_HAVE_VFORK),y) ifeq ($(CONFIG_SCHED_WAITPID),y) @@ -54,6 +54,14 @@ ifeq ($(CONFIG_SCHED_STARTHOOK),y) TSK_SRCS += task_starthook.c endif +ifeq ($(CONFIG_SCHED_ATEXIT),y) +TSK_SRCS += task_atexit.c +endif + +ifeq ($(CONFIG_SCHED_ONEXIT),y) +TSK_SRCS += task_onexit.c +endif + # Include task build support DEPPATH += --dep-path task diff --git a/sched/atexit.c b/sched/task/task_atexit.c similarity index 99% rename from sched/atexit.c rename to sched/task/task_atexit.c index 7faa52d44cf..0365abd628a 100644 --- a/sched/atexit.c +++ b/sched/task/task_atexit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/atexit.c + * sched/task/task_atexit.c * * Copyright (C) 2007, 2009, 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,6 +48,7 @@ #include #include "os_internal.h" +#include "task/task.h" #ifdef CONFIG_SCHED_ATEXIT diff --git a/sched/getpid.c b/sched/task/task_getpid.c similarity index 98% rename from sched/getpid.c rename to sched/task/task_getpid.c index 69e2a9c3422..524dd14867a 100644 --- a/sched/getpid.c +++ b/sched/task/task_getpid.c @@ -1,5 +1,5 @@ /************************************************************************ - * sched/getpid.c + * sched/task/task_getpid.c * * Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,6 +42,7 @@ #include #include "os_internal.h" +#include "task/task.h" /************************************************************************ * Pre-processor Definitions diff --git a/sched/on_exit.c b/sched/task/task_onexit.c similarity index 99% rename from sched/on_exit.c rename to sched/task/task_onexit.c index d5f180412a2..aa131c5aff2 100644 --- a/sched/on_exit.c +++ b/sched/task/task_onexit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/on_exit.c + * sched/task/task_onexit.c * * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,6 +48,7 @@ #include #include "os_internal.h" +#include "task/task.h" #ifdef CONFIG_SCHED_ONEXIT diff --git a/sched/prctl.c b/sched/task/task_prctl.c similarity index 99% rename from sched/prctl.c rename to sched/task/task_prctl.c index cf40708fa99..f0f1f2ebb78 100644 --- a/sched/prctl.c +++ b/sched/task/task_prctl.c @@ -1,5 +1,5 @@ /************************************************************************ - * sched/prctl.c + * sched/task/task_prctl.c * * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,6 +48,7 @@ #include #include "os_internal.h" +#include "task/task.h" /************************************************************************ * Private Functions