summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-08 15:08:07 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-08 15:08:07 -0600
commit0dc82c9ce3122c309e91981ed62a4d2a08744b86 (patch)
tree7ce57f25ec96d84a065c7f4117e301fc01b93c74
parente3d5db418c7b8fcbba1d7dbb5f6b79ef805203f8 (diff)
downloadnuttx-0dc82c9ce3122c309e91981ed62a4d2a08744b86.tar.gz
nuttx-0dc82c9ce3122c309e91981ed62a4d2a08744b86.tar.bz2
nuttx-0dc82c9ce3122c309e91981ed62a4d2a08744b86.zip
Move page fill sources from sched/ to sched/paging
-rw-r--r--nuttx/Documentation/NuttXDemandPaging.html2
-rw-r--r--nuttx/sched/Makefile10
-rw-r--r--nuttx/sched/os_bringup.c2
-rw-r--r--nuttx/sched/paging/Make.defs45
-rw-r--r--nuttx/sched/paging/paging.h (renamed from nuttx/sched/pg_internal.h)8
-rw-r--r--nuttx/sched/paging/pg_miss.c (renamed from nuttx/sched/pg_miss.c)4
-rw-r--r--nuttx/sched/paging/pg_worker.c (renamed from nuttx/sched/pg_worker.c)4
-rw-r--r--nuttx/sched/timer/Make.defs47
8 files changed, 105 insertions, 17 deletions
diff --git a/nuttx/Documentation/NuttXDemandPaging.html b/nuttx/Documentation/NuttXDemandPaging.html
index 2e1ebaf3e..b5fa2f9f2 100644
--- a/nuttx/Documentation/NuttXDemandPaging.html
+++ b/nuttx/Documentation/NuttXDemandPaging.html
@@ -213,7 +213,7 @@
</p>
<p>
Declarations for <code>g_waitingforfill</code>, <code>g_pgworker</code>, and other
- internal, private definitions will be provided in <code>sched/pg_internal.h</code>.
+ internal, private definitions will be provided in <code>sched/paging/paging.h</code>.
All public definitions that should be used by the architecture-specific code will be available
in <code>include/nuttx/page.h</code>.
Most architecture-specific functions are declared in <code>include/nuttx/arch.h</code>,
diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile
index 91a5e46a8..a14080eed 100644
--- a/nuttx/sched/Makefile
+++ b/nuttx/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/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c
index 776c789b9..22ced49f1 100644
--- a/nuttx/sched/os_bringup.c
+++ b/nuttx/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/nuttx/sched/paging/Make.defs b/nuttx/sched/paging/Make.defs
new file mode 100644
index 000000000..ec90642cc
--- /dev/null
+++ b/nuttx/sched/paging/Make.defs
@@ -0,0 +1,45 @@
+############################################################################
+# sched/paging/Make.defs
+#
+# Copyright (C) 2014 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <gnutt@nuttx.org>
+#
+# 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/nuttx/sched/pg_internal.h b/nuttx/sched/paging/paging.h
index e2063aec6..eef90421a 100644
--- a/nuttx/sched/pg_internal.h
+++ b/nuttx/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 <gnutt@nuttx.org>
@@ -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/nuttx/sched/pg_miss.c b/nuttx/sched/paging/pg_miss.c
index aa04b2d53..f134fc08e 100644
--- a/nuttx/sched/pg_miss.c
+++ b/nuttx/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 <gnutt@nuttx.org>
@@ -49,7 +49,7 @@
#ifdef CONFIG_PAGING
#include "os_internal.h"
-#include "pg_internal.h"
+#include "paging/paging.h"
/****************************************************************************
* Global Functions
diff --git a/nuttx/sched/pg_worker.c b/nuttx/sched/paging/pg_worker.c
index 13f7fe1d9..10e4ba4f3 100644
--- a/nuttx/sched/pg_worker.c
+++ b/nuttx/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 <nuttx/clock.h>
#include "os_internal.h"
-#include "pg_internal.h"
+#include "paging/paging.h"
#ifdef CONFIG_PAGING
diff --git a/nuttx/sched/timer/Make.defs b/nuttx/sched/timer/Make.defs
new file mode 100644
index 000000000..09e964513
--- /dev/null
+++ b/nuttx/sched/timer/Make.defs
@@ -0,0 +1,47 @@
+############################################################################
+# sched/timer/Make.defs
+#
+# Copyright (C) 2014 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <gnutt@nuttx.org>
+#
+# 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