diff --git a/sched/Makefile b/sched/Makefile index b7675f84af..563983aac8 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -39,14 +39,6 @@ VPATH = DEPPATH = --dep-path . ASRCS = -AOBJS = $(ASRCS:.S=$(OBJEXT)) - -MISC_SRCS = errno_getptr.c sched_garbage.c sched_getfiles.c -MISC_SRCS += sched_getsockets.c sched_getstreams.c - -ifeq ($(CONFIG_NUTTX_KERNEL),y) -MISC_SRCS += errno_get.c errno_set.c -endif 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 @@ -72,7 +64,9 @@ ifeq ($(CONFIG_SCHED_STARTHOOK),y) TSK_SRCS += task_starthook.c endif -SCHED_SRCS = sched_setparam.c sched_setpriority.c sched_getparam.c +SCHED_SRCS = sched_garbage.c sched_getfiles.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 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 @@ -101,19 +95,20 @@ SCHED_SRCS += sched_cpuload.c endif ifeq ($(CONFIG_SCHED_TICKLESS),y) -TIME_SRCS += sched_timerexpiration.c +SCHED_SRCS += sched_timerexpiration.c else -TIME_SRCS += sched_processtimer.c +SCHED_SRCS += sched_processtimer.c endif ifneq ($(CONFIG_DISABLE_SIGNALS),y) -TIME_SRCS += nanosleep.c +SCHED_SRCS += nanosleep.c endif include init/Make.defs include irq/Make.defs include paging/Make.defs include group/Make.defs +include errno/Make.defs include wdog/Make.defs include semaphore/Make.defs include signal/Make.defs @@ -123,9 +118,12 @@ include clock/Make.defs include timer/Make.defs include environ/Make.defs -CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) $(TIME_SRCS) -CSRCS += $(INIT_SRCS) $(IRQ_SRCS) $(PG_SRCS) $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(CLOCK_SRCS) $(TIMER_SRCS) $(ENV_SRCS) +CSRCS = $(INIT_SRCS) $(IRQ_SRCS) $(PG_SRCS) $(GRP_SRCS) $(TSK_SRCS) +CSRCS += $(SCHED_SRCS) $(ERRNO_SRCS) $(WDOG_SRCS) $(SEM_SRCS) +CSRCS += $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(CLOCK_SRCS) +CSRCS += $(TIMER_SRCS) $(ENV_SRCS) +AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) diff --git a/sched/errno/Make.defs b/sched/errno/Make.defs new file mode 100644 index 0000000000..481b398123 --- /dev/null +++ b/sched/errno/Make.defs @@ -0,0 +1,45 @@ +############################################################################ +# sched/errno/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. +# +############################################################################ + +ERRNO_SRCS = errno_getptr.c + +ifeq ($(CONFIG_NUTTX_KERNEL),y) +ERRNO_SRCS += errno_get.c errno_set.c +endif + +# Include errno build support + +DEPPATH += --dep-path errno +VPATH += :errno diff --git a/sched/errno_get.c b/sched/errno/errno_get.c similarity index 99% rename from sched/errno_get.c rename to sched/errno/errno_get.c index c313e38682..100facc335 100644 --- a/sched/errno_get.c +++ b/sched/errno/errno_get.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/errno_get.c + * sched/errno/errno_get.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/errno_getptr.c b/sched/errno/errno_getptr.c similarity index 99% rename from sched/errno_getptr.c rename to sched/errno/errno_getptr.c index 76123468db..50b1e085e1 100644 --- a/sched/errno_getptr.c +++ b/sched/errno/errno_getptr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/errno_getptr.c + * sched/errno/errno_getptr.c * * Copyright (C) 2007, 2008, 2011, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/errno_set.c b/sched/errno/errno_set.c similarity index 99% rename from sched/errno_set.c rename to sched/errno/errno_set.c index eda680b64e..73f8198977 100644 --- a/sched/errno_set.c +++ b/sched/errno/errno_set.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/errno_set.c + * sched/errno/errno_set.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -79,5 +79,3 @@ void set_errno(int errcode) { *get_errno_ptr() = errcode; } - -