diff --git a/sched/Makefile b/sched/Makefile index fb34c75894..91a5e46a83 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -110,11 +110,6 @@ ifneq ($(CONFIG_DISABLE_SIGNALS),y) TIME_SRCS += nanosleep.c endif -ifneq ($(CONFIG_DISABLE_POSIX_TIMERS),y) -TIMER_SRCS += timer_initialize.c timer_create.c timer_delete.c timer_getoverrun.c -TIMER_SRCS += timer_gettime.c timer_settime.c timer_release.c -endif - ifeq ($(CONFIG_PAGING),y) PGFILL_SRCS = pg_miss.c pg_worker.c endif @@ -127,11 +122,12 @@ include signal/Make.defs include pthread/Make.defs include mqueue/Make.defs include clock/Make.defs +include timer/Make.defs include environ/Make.defs CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) -CSRCS += $(TIME_SRCS) $(TIMER_SRCS) $(PGFILL_SRCS) -CSRCS += $(IRQ_SRCS) $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(CLOCK_SRCS) $(ENV_SRCS) +CSRCS += $(TIME_SRCS) $(PGFILL_SRCS) +CSRCS += $(IRQ_SRCS) $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(CLOCK_SRCS) $(TIMER_SRCS) $(ENV_SRCS) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/sched/os_start.c b/sched/os_start.c index dd5d79620a..a338a1c914 100644 --- a/sched/os_start.c +++ b/sched/os_start.c @@ -62,7 +62,7 @@ # include "pthread/pthread.h" #endif #include "clock/clock.h" -#include "timer_internal.h" +#include "timer/timer.h" #include "irq/irq.h" #ifdef HAVE_TASK_GROUP #include "group/group.h" diff --git a/sched/sched_releasetcb.c b/sched/sched_releasetcb.c index 5226d92fd1..69d7d99d30 100644 --- a/sched/sched_releasetcb.c +++ b/sched/sched_releasetcb.c @@ -46,7 +46,7 @@ #include "os_internal.h" #include "group/group.h" -#include "timer_internal.h" +#include "timer/timer.h" /************************************************************************ * Private Functions diff --git a/sched/timer_internal.h b/sched/timer/timer.h similarity index 97% rename from sched/timer_internal.h rename to sched/timer/timer.h index 71dfb59a34..4ecbe79734 100644 --- a/sched/timer_internal.h +++ b/sched/timer/timer.h @@ -1,5 +1,5 @@ /******************************************************************************** - * timer_internal.h + * sched/timer/timer.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ********************************************************************************/ -#ifndef __SCHED_TIMER_INTERNAL_H -#define __SCHED_TIMER_INTERNAL_H +#ifndef __SCHED_TIMER_TIMER_H +#define __SCHED_TIMER_TIMER_H /******************************************************************************** * Included Files @@ -99,4 +99,4 @@ void weak_function timer_initialize(void); void weak_function timer_deleteall(pid_t pid); int timer_release(FAR struct posix_timer_s *timer); -#endif /* __SCHED_TIMER_INTERNAL_H */ +#endif /* __SCHED_TIMER_TIMER_H */ diff --git a/sched/timer_create.c b/sched/timer/timer_create.c similarity index 99% rename from sched/timer_create.c rename to sched/timer/timer_create.c index 8b620502a7..7b68cee84d 100644 --- a/sched/timer_create.c +++ b/sched/timer/timer_create.c @@ -1,5 +1,5 @@ /******************************************************************************** - * sched/timer_create.c + * sched/timer/timer_create.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,7 +48,7 @@ #include -#include "timer_internal.h" +#include "timer/timer.h" #ifndef CONFIG_DISABLE_POSIX_TIMERS diff --git a/sched/timer_delete.c b/sched/timer/timer_delete.c similarity index 98% rename from sched/timer_delete.c rename to sched/timer/timer_delete.c index c497c414e4..53a0dff2cb 100644 --- a/sched/timer_delete.c +++ b/sched/timer/timer_delete.c @@ -1,5 +1,5 @@ /******************************************************************************** - * timer_delete.c + * sched/timer/timer_delete.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include #include -#include "timer_internal.h" +#include "timer/timer.h" #ifndef CONFIG_DISABLE_POSIX_TIMERS diff --git a/sched/timer_getoverrun.c b/sched/timer/timer_getoverrun.c similarity index 98% rename from sched/timer_getoverrun.c rename to sched/timer/timer_getoverrun.c index f804992595..aa8eab3aa0 100644 --- a/sched/timer_getoverrun.c +++ b/sched/timer/timer_getoverrun.c @@ -1,5 +1,5 @@ /******************************************************************************** - * timer_getoverrun.c + * sched/timer/timer_getoverrun.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include #include -#include "timer_internal.h" +#include "timer/timer.h" #ifndef CONFIG_DISABLE_POSIX_TIMERS diff --git a/sched/timer_gettime.c b/sched/timer/timer_gettime.c similarity index 98% rename from sched/timer_gettime.c rename to sched/timer/timer_gettime.c index c624badd18..1c162976a7 100644 --- a/sched/timer_gettime.c +++ b/sched/timer/timer_gettime.c @@ -1,5 +1,5 @@ /******************************************************************************** - * timer_gettime.c + * sched/timer/timer_gettime.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "clock/clock.h" -#include "timer_internal.h" +#include "timer/timer.h" #ifndef CONFIG_DISABLE_POSIX_TIMERS diff --git a/sched/timer_initialize.c b/sched/timer/timer_initialize.c similarity index 98% rename from sched/timer_initialize.c rename to sched/timer/timer_initialize.c index 2651469ef6..d895cb3886 100644 --- a/sched/timer_initialize.c +++ b/sched/timer/timer_initialize.c @@ -1,5 +1,5 @@ /******************************************************************************** - * timer_initialize.c + * sched/timer/timer_initialize.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -45,7 +45,7 @@ #include #include -#include "timer_internal.h" +#include "timer/timer.h" #ifndef CONFIG_DISABLE_POSIX_TIMERS diff --git a/sched/timer_release.c b/sched/timer/timer_release.c similarity index 98% rename from sched/timer_release.c rename to sched/timer/timer_release.c index 50548b3d97..dda64f7e53 100644 --- a/sched/timer_release.c +++ b/sched/timer/timer_release.c @@ -1,5 +1,5 @@ /******************************************************************************** - * timer_release.c + * sched/timer/timer_release.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,7 +44,7 @@ #include -#include "timer_internal.h" +#include "timer/timer.h" #ifndef CONFIG_DISABLE_POSIX_TIMERS diff --git a/sched/timer_settime.c b/sched/timer/timer_settime.c similarity index 99% rename from sched/timer_settime.c rename to sched/timer/timer_settime.c index e3cd2cb156..5ea4efca25 100644 --- a/sched/timer_settime.c +++ b/sched/timer/timer_settime.c @@ -1,5 +1,5 @@ /******************************************************************************** - * sched/timer_settime.c + * sched/timer/timer_settime.c * * Copyright (C) 2007-2010, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,7 +47,7 @@ #include "os_internal.h" #include "clock/clock.h" #include "signal/signal.h" -#include "timer_internal.h" +#include "timer/timer.h" #ifndef CONFIG_DISABLE_POSIX_TIMERS