diff --git a/Documentation/NuttXDemandPaging.html b/Documentation/NuttXDemandPaging.html index 2e1ebaf3e1..b5fa2f9f2a 100644 --- a/Documentation/NuttXDemandPaging.html +++ b/Documentation/NuttXDemandPaging.html @@ -213,7 +213,7 @@

Declarations for g_waitingforfill, g_pgworker, and other - internal, private definitions will be provided in sched/pg_internal.h. + internal, private definitions will be provided in sched/paging/paging.h. All public definitions that should be used by the architecture-specific code will be available in include/nuttx/page.h. Most architecture-specific functions are declared in include/nuttx/arch.h, diff --git a/sched/Makefile b/sched/Makefile index 91a5e46a83..a14080eed9 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -110,11 +110,8 @@ ifneq ($(CONFIG_DISABLE_SIGNALS),y) TIME_SRCS += nanosleep.c endif -ifeq ($(CONFIG_PAGING),y) -PGFILL_SRCS = pg_miss.c pg_worker.c -endif - include irq/Make.defs +include paging/Make.defs include group/Make.defs include wdog/Make.defs include semaphore/Make.defs @@ -125,9 +122,8 @@ include clock/Make.defs include timer/Make.defs include environ/Make.defs -CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_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) +CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) $(TIME_SRCS) +CSRCS += $(IRQ_SRCS) $(PG_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_bringup.c b/sched/os_bringup.c index 776c789b93..22ced49f15 100644 --- a/sched/os_bringup.c +++ b/sched/os_bringup.c @@ -55,7 +55,7 @@ #include "os_internal.h" #ifdef CONFIG_PAGING -# include "pg_internal.h" +# include "paging/paging.h" #endif /**************************************************************************** diff --git a/sched/paging/Make.defs b/sched/paging/Make.defs new file mode 100644 index 0000000000..ec90642cc0 --- /dev/null +++ b/sched/paging/Make.defs @@ -0,0 +1,45 @@ +############################################################################ +# sched/paging/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. +# +############################################################################ + +ifneq ($(CONFIG_PAGING),y) + +PG_SRCS = pg_miss.c pg_worker.c + +# Include paging build support + +DEPPATH += --dep-path paging +VPATH += :paging + +endif diff --git a/sched/pg_internal.h b/sched/paging/paging.h similarity index 97% rename from sched/pg_internal.h rename to sched/paging/paging.h index e2063aec66..eef90421ae 100644 --- a/sched/pg_internal.h +++ b/sched/paging/paging.h @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/pg_internal.h + * sched/paging/paging.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __SCHED_PG_INTERNAL_H -#define __SCHED_PG_INTERNAL_H +#ifndef __SCHED_PAGING_PAGING_H +#define __SCHED_PAGING_PAGING_H /**************************************************************************** * Included Files @@ -123,4 +123,4 @@ int pg_worker(int argc, char *argv[]); #endif /* __ASSEMBLY__ */ #endif /* CONFIG_PAGING */ -#endif /* __SCHED_PG_INTERNAL_H */ +#endif /* __SCHED_PAGING_PAGING_H */ diff --git a/sched/pg_miss.c b/sched/paging/pg_miss.c similarity index 99% rename from sched/pg_miss.c rename to sched/paging/pg_miss.c index aa04b2d53d..f134fc08e3 100644 --- a/sched/pg_miss.c +++ b/sched/paging/pg_miss.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/pg_miss.c + * sched/paging/pg_miss.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,7 +49,7 @@ #ifdef CONFIG_PAGING #include "os_internal.h" -#include "pg_internal.h" +#include "paging/paging.h" /**************************************************************************** * Global Functions diff --git a/sched/pg_worker.c b/sched/paging/pg_worker.c similarity index 99% rename from sched/pg_worker.c rename to sched/paging/pg_worker.c index 13f7fe1d94..10e4ba4f3a 100644 --- a/sched/pg_worker.c +++ b/sched/paging/pg_worker.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/pg_worker.c + * sched/paging/pg_worker.c * Page fill worker thread implementation. * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. @@ -53,7 +53,7 @@ #include #include "os_internal.h" -#include "pg_internal.h" +#include "paging/paging.h" #ifdef CONFIG_PAGING diff --git a/sched/timer/Make.defs b/sched/timer/Make.defs new file mode 100644 index 0000000000..09e964513c --- /dev/null +++ b/sched/timer/Make.defs @@ -0,0 +1,47 @@ +############################################################################ +# sched/timer/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. +# +############################################################################ + +ifneq ($(CONFIG_DISABLE_POSIX_TIMERS),y) + +TIMER_SRCS += timer_initialize.c timer_create.c timer_delete.c +TIMER_SRCS += timer_getoverrun.c timer_gettime.c timer_settime.c +TIMER_SRCS += timer_release.c + +# Include timer build support + +DEPPATH += --dep-path timer +VPATH += :timer + +endif