1
0
Fork 0
forked from nuttx/nuttx-update

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

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"
/************************************************************************

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"

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"
/****************************************************************************

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"
/****************************************************************************

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"
/****************************************************************************

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"
/****************************************************************************

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"
/************************************************************

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"
/****************************************************************************

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"
/****************************************************************************

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"

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"

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"

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"

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"

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"

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"

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"

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"

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"

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"

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"

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"

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"
/****************************************************************************

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"
/****************************************************************************

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"
/****************************************************************************

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"

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"
/****************************************************************************

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"

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"
/****************************************************************************

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"

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"

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"

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"
/****************************************************************************

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"

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"
/****************************************************************************

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"
/***************************************************************************

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"
/****************************************************************************

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"
/***************************************************************************

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"

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"
/***************************************************************************

View file

@ -43,7 +43,7 @@
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************

View file

@ -43,7 +43,7 @@
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "up_internal.h"
/****************************************************************************

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
sched/clock/Make.defs Normal file
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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
/****************************************************************************
* sched/clock_initialize.c
* sched/clock/clock_initialize.c
*
* Copyright (C) 2007, 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -53,7 +53,7 @@
#include <nuttx/time.h>
#include <nuttx/rtc.h>
#include "clock_internal.h"
#include "clock/clock.h"
/****************************************************************************
* Definitions

View file

@ -1,5 +1,5 @@
/************************************************************************
* sched/clock_settime.c
* sched/clock/clock_settime.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -46,7 +46,7 @@
#include <debug.h>
#include <arch/irq.h>
#include "clock_internal.h"
#include "clock/clock.h"
/************************************************************************
* Definitions

View file

@ -1,5 +1,5 @@
/****************************************************************************
* sched/clock_systimer.c
* sched/clock/clock_systimer.c
*
* Copyright (C) 2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -44,7 +44,7 @@
#include <nuttx/arch.h>
#include <nuttx/clock.h>
#include "clock_internal.h"
#include "clock/clock.h"
/****************************************************************************
* Pre-processor Definitions

View file

@ -1,5 +1,5 @@
/********************************************************************************
* clock_ticks2time.c
* sched/clock/clock_ticks2time.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -40,7 +40,7 @@
#include <nuttx/config.h>
#include <time.h>
#include "clock_internal.h"
#include "clock/clock.h"
/********************************************************************************
* Definitions

View file

@ -1,5 +1,5 @@
/********************************************************************************
* sched/clock_time2ticks.c
* sched/clock/clock_time2ticks.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -42,7 +42,7 @@
#include <stdint.h>
#include <time.h>
#include "clock_internal.h"
#include "clock/clock.h"
/********************************************************************************
* Definitions

View file

@ -51,7 +51,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "mqueue/mqueue.h"
/****************************************************************************

View file

@ -49,7 +49,7 @@
#include <debug.h>
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "os_internal.h"
#include "mqueue/mqueue.h"

View file

@ -47,7 +47,7 @@
#include <nuttx/clock.h>
#include <arch/irq.h>
#include "clock_internal.h"
#include "clock/clock.h"
/****************************************************************************
* Definitions

View file

@ -61,7 +61,7 @@
#ifndef CONFIG_DISABLE_PTHREAD
# include "pthread/pthread.h"
#endif
#include "clock_internal.h"
#include "clock/clock.h"
#include "timer_internal.h"
#include "irq/irq.h"
#ifdef HAVE_TASK_GROUP

View file

@ -52,7 +52,7 @@
#include "os_internal.h"
#include "pthread/pthread.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "signal/signal.h"
/****************************************************************************

View file

@ -54,7 +54,7 @@
#include "os_internal.h"
#include "group/group.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "pthread/pthread.h"
/****************************************************************************

View file

@ -48,7 +48,7 @@
#include "os_internal.h"
#include "wdog/wdog.h"
#include "clock_internal.h"
#include "clock/clock.h"
/************************************************************************
* Pre-processor Definitions

View file

@ -46,7 +46,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
/************************************************************************
* Definitions

View file

@ -47,7 +47,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
/****************************************************************************
* Definitions

View file

@ -51,7 +51,7 @@
#include "os_internal.h"
#include "wdog/wdog.h"
#include "clock_internal.h"
#include "clock/clock.h"
#ifdef CONFIG_SCHED_TICKLESS

View file

@ -50,7 +50,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "semaphore/semaphore.h"
/****************************************************************************

View file

@ -54,7 +54,7 @@
#include "os_internal.h"
#include "signal/signal.h"
#include "clock_internal.h"
#include "clock/clock.h"
/****************************************************************************
* Pre-processor Definitions

View file

@ -42,7 +42,7 @@
#include <time.h>
#include <errno.h>
#include "clock_internal.h"
#include "clock/clock.h"
#include "timer_internal.h"
#ifndef CONFIG_DISABLE_POSIX_TIMERS

View file

@ -45,7 +45,7 @@
#include <errno.h>
#include "os_internal.h"
#include "clock_internal.h"
#include "clock/clock.h"
#include "signal/signal.h"
#include "timer_internal.h"