Move clock functions from sched/ to sched/clock

This commit is contained in:
Gregory Nutt
2014-08-08 14:43:02 -06:00
parent 85e8117062
commit d4b56eb3cc
69 changed files with 127 additions and 87 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
#include <nuttx/arch.h>
#include <8052.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/************************************************************************
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "os_internal.h"
#include "up_internal.h"
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -45,7 +45,7 @@
#include "chip.h"
#include "up_arch.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/************************************************************
+1 -1
View File
@@ -46,7 +46,7 @@
#include "chip.h"
#include "up_arch.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -48,7 +48,7 @@
#include "chip.h"
#include "up_arch.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -47,7 +47,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -47,7 +47,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include "chip.h"
#include "up_arch.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "lpc214x_timer.h"
+1 -1
View File
@@ -48,7 +48,7 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -47,7 +47,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -47,7 +47,7 @@
#include "chip.h"
#include "up_arch.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "str71x_internal.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <arch/board/board.h>
#include "nvic.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -43,7 +43,7 @@
#include <debug.h>
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "os_internal.h"
#include "up_internal.h"
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -51,7 +51,7 @@
#include <arch/io.h>
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "up_arch.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include "chip/chip.h"
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -46,7 +46,7 @@
#include <arch/board/board.h>
#include "chip/chip.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/***************************************************************************
+1 -1
View File
@@ -47,7 +47,7 @@
#include "chip/chip.h"
#include "chip/switch.h"
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include "chip/chip.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/***************************************************************************
+1 -1
View File
@@ -45,7 +45,7 @@
#include <arch/board/board.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
#include "chip.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include "chip/chip.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/***************************************************************************
+1 -1
View File
@@ -43,7 +43,7 @@
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+1 -1
View File
@@ -43,7 +43,7 @@
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************
+3 -6
View File
@@ -110,10 +110,6 @@ ifneq ($(CONFIG_DISABLE_SIGNALS),y)
TIME_SRCS += nanosleep.c
endif
CLOCK_SRCS = clock_initialize.c clock_settime.c clock_gettime.c clock_getres.c
CLOCK_SRCS += clock_time2ticks.c clock_abstime2ticks.c clock_ticks2time.c
CLOCK_SRCS += clock_gettimeofday.c clock_systimer.c
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
@@ -130,11 +126,12 @@ include semaphore/Make.defs
include signal/Make.defs
include pthread/Make.defs
include mqueue/Make.defs
include clock/Make.defs
include environ/Make.defs
CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS)
CSRCS += $(TIME_SRCS) $(TIMER_SRCS) $(PGFILL_SRCS) $(CLOCK_SRCS)
CSRCS += $(IRQ_SRCS) $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(ENV_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)
COBJS = $(CSRCS:.c=$(OBJEXT))
+43
View File
@@ -0,0 +1,43 @@
############################################################################
# sched/clock/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.
#
############################################################################
CLOCK_SRCS = clock_initialize.c clock_settime.c clock_gettime.c clock_getres.c
CLOCK_SRCS += clock_time2ticks.c clock_abstime2ticks.c clock_ticks2time.c
CLOCK_SRCS += clock_gettimeofday.c clock_systimer.c
# Include clock build support
DEPPATH += --dep-path clock
VPATH += :clock
@@ -1,5 +1,5 @@
/********************************************************************************
* sched/clock_internal.h
* sched/clock/clock.h
*
* Copyright (C) 2007-2009, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,8 +33,8 @@
*
********************************************************************************/
#ifndef __SCHED_CLOCK_INTERNAL_H
#define __SCHED_CLOCK_INTERNAL_H
#ifndef __SCHED_CLOCK_CLOCK_H
#define __SCHED_CLOCK_CLOCK_H
/********************************************************************************
* Included Files
@@ -90,4 +90,4 @@ int clock_abstime2ticks(clockid_t clockid,
int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks);
int clock_ticks2time(int ticks, FAR struct timespec *reltime);
#endif /* __SCHED_CLOCK_INTERNAL_H */
#endif /* __SCHED_CLOCK_CLOCK_H */
@@ -1,5 +1,5 @@
/********************************************************************************
* clock_abstime2ticks.c
* sched/clock/clock_abstime2ticks.c
*
* Copyright (C) 2007, 2008, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -42,10 +42,10 @@
#include <time.h>
#include <errno.h>
#include <debug.h>
#include "clock_internal.h"
#include "clock/clock.h"
/********************************************************************************
* Definitions
* Pre-processor Definitions
********************************************************************************/
/********************************************************************************
@@ -1,5 +1,5 @@
/****************************************************************************
* sched/clock_dow.c
* sched/clock/clock_dow.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -43,7 +43,7 @@
#include <nuttx/clock.h>
#include "clock_internal.h"
#include "clock/clock.h"
/****************************************************************************
* Pre-processor Definitions
@@ -1,5 +1,5 @@
/************************************************************************
* sched/clock_getres.c
* sched/clock/clock_getres.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -44,7 +44,7 @@
#include <errno.h>
#include <debug.h>
#include "clock_internal.h"
#include "clock/clock.h"
/************************************************************************
* Definitions
@@ -1,5 +1,5 @@
/************************************************************************
* sched/clock_gettime.c
* sched/clock/clock_gettime.c
*
* Copyright (C) 2007, 2009, 2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -48,7 +48,7 @@
#include <arch/irq.h>
#include "clock_internal.h"
#include "clock/clock.h"
/************************************************************************
* Pre-processor Definitions
@@ -1,5 +1,5 @@
/****************************************************************************
* sched/clock_gettimeofday.c
* sched/clock/clock_gettimeofday.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -43,7 +43,7 @@
#include <errno.h>
#include <debug.h>
#include "clock_internal.h"
#include "clock/clock.h"
/****************************************************************************
* Definitions

Some files were not shown because too many files have changed in this diff Show More