Move page fill sources from sched/ to sched/paging

This commit is contained in:
Gregory Nutt 2014-08-08 15:08:07 -06:00
parent b3b95ed05b
commit a79ecce878
8 changed files with 105 additions and 17 deletions

View File

@ -213,7 +213,7 @@
</p> </p>
<p> <p>
Declarations for <code>g_waitingforfill</code>, <code>g_pgworker</code>, and other 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 All public definitions that should be used by the architecture-specific code will be available
in <code>include/nuttx/page.h</code>. in <code>include/nuttx/page.h</code>.
Most architecture-specific functions are declared in <code>include/nuttx/arch.h</code>, Most architecture-specific functions are declared in <code>include/nuttx/arch.h</code>,

View File

@ -110,11 +110,8 @@ ifneq ($(CONFIG_DISABLE_SIGNALS),y)
TIME_SRCS += nanosleep.c TIME_SRCS += nanosleep.c
endif endif
ifeq ($(CONFIG_PAGING),y)
PGFILL_SRCS = pg_miss.c pg_worker.c
endif
include irq/Make.defs include irq/Make.defs
include paging/Make.defs
include group/Make.defs include group/Make.defs
include wdog/Make.defs include wdog/Make.defs
include semaphore/Make.defs include semaphore/Make.defs
@ -125,9 +122,8 @@ include clock/Make.defs
include timer/Make.defs include timer/Make.defs
include environ/Make.defs include environ/Make.defs
CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) $(TIME_SRCS)
CSRCS += $(TIME_SRCS) $(PGFILL_SRCS) CSRCS += $(IRQ_SRCS) $(PG_SRCS) $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(CLOCK_SRCS) $(TIMER_SRCS) $(ENV_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)) COBJS = $(CSRCS:.c=$(OBJEXT))

View File

@ -55,7 +55,7 @@
#include "os_internal.h" #include "os_internal.h"
#ifdef CONFIG_PAGING #ifdef CONFIG_PAGING
# include "pg_internal.h" # include "paging/paging.h"
#endif #endif
/**************************************************************************** /****************************************************************************

45
sched/paging/Make.defs Normal file
View File

@ -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

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* sched/pg_internal.h * sched/paging/paging.h
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
@ -33,8 +33,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __SCHED_PG_INTERNAL_H #ifndef __SCHED_PAGING_PAGING_H
#define __SCHED_PG_INTERNAL_H #define __SCHED_PAGING_PAGING_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -123,4 +123,4 @@ int pg_worker(int argc, char *argv[]);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* CONFIG_PAGING */ #endif /* CONFIG_PAGING */
#endif /* __SCHED_PG_INTERNAL_H */ #endif /* __SCHED_PAGING_PAGING_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* sched/pg_miss.c * sched/paging/pg_miss.c
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
@ -49,7 +49,7 @@
#ifdef CONFIG_PAGING #ifdef CONFIG_PAGING
#include "os_internal.h" #include "os_internal.h"
#include "pg_internal.h" #include "paging/paging.h"
/**************************************************************************** /****************************************************************************
* Global Functions * Global Functions

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* sched/pg_worker.c * sched/paging/pg_worker.c
* Page fill worker thread implementation. * Page fill worker thread implementation.
* *
* Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
@ -53,7 +53,7 @@
#include <nuttx/clock.h> #include <nuttx/clock.h>
#include "os_internal.h" #include "os_internal.h"
#include "pg_internal.h" #include "paging/paging.h"
#ifdef CONFIG_PAGING #ifdef CONFIG_PAGING

47
sched/timer/Make.defs Normal file
View File

@ -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