Rename CONFIG_SCHED_TIMEKEEPING to CONFIG_CLOCK_TIMEKEEPING. That is a better compartmentalized name.

This commit is contained in:
Gregory Nutt 2016-07-11 06:54:02 -06:00
parent f47b69e1f0
commit 246773faa7
18 changed files with 43 additions and 43 deletions

View File

@ -80,7 +80,7 @@ static struct stm32_freerun_s *g_freerun;
* *
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
static int stm32_freerun_handler(int irq, void *context) static int stm32_freerun_handler(int irq, void *context)
{ {
struct stm32_freerun_s *freerun = g_freerun; struct stm32_freerun_s *freerun = g_freerun;
@ -91,7 +91,7 @@ static int stm32_freerun_handler(int irq, void *context)
STM32_TIM_ACKINT(freerun->tch, 0); STM32_TIM_ACKINT(freerun->tch, 0);
return OK; return OK;
} }
#endif /* CONFIG_SCHED_TIMEKEEPING */ #endif /* CONFIG_CLOCK_TIMEKEEPING */
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
@ -145,11 +145,11 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan,
freerun->chan = chan; freerun->chan = chan;
freerun->running = false; freerun->running = false;
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
freerun->counter_mask = 0xffffffffull; freerun->counter_mask = 0xffffffffull;
#endif #endif
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
freerun->overflow = 0; freerun->overflow = 0;
g_freerun = freerun; g_freerun = freerun;
@ -166,7 +166,7 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan,
STM32_TIM_SETMODE(freerun->tch, STM32_TIM_MODE_UP); STM32_TIM_SETMODE(freerun->tch, STM32_TIM_MODE_UP);
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
STM32_TIM_ACKINT(freerun->tch, 0); STM32_TIM_ACKINT(freerun->tch, 0);
STM32_TIM_ENABLEINT(freerun->tch, 0); STM32_TIM_ENABLEINT(freerun->tch, 0);
#endif #endif
@ -193,7 +193,7 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan,
* *
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
int stm32_freerun_counter(struct stm32_freerun_s *freerun, int stm32_freerun_counter(struct stm32_freerun_s *freerun,
struct timespec *ts) struct timespec *ts)
@ -270,7 +270,7 @@ int stm32_freerun_counter(struct stm32_freerun_s *freerun,
return OK; return OK;
} }
#else /* CONFIG_SCHED_TIMEKEEPING */ #else /* CONFIG_CLOCK_TIMEKEEPING */
int stm32_freerun_counter(struct stm32_freerun_s *freerun, uint64_t *counter) int stm32_freerun_counter(struct stm32_freerun_s *freerun, uint64_t *counter)
{ {
@ -278,7 +278,7 @@ int stm32_freerun_counter(struct stm32_freerun_s *freerun, uint64_t *counter)
return OK; return OK;
} }
#endif /* CONFIG_SCHED_TIMEKEEPING */ #endif /* CONFIG_CLOCK_TIMEKEEPING */
/**************************************************************************** /****************************************************************************
* Name: stm32_freerun_uninitialize * Name: stm32_freerun_uninitialize

View File

@ -67,11 +67,11 @@ struct stm32_freerun_s
FAR struct stm32_tim_dev_s *tch; /* Handle returned by stm32_tim_init() */ FAR struct stm32_tim_dev_s *tch; /* Handle returned by stm32_tim_init() */
uint32_t frequency; uint32_t frequency;
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
uint32_t overflow; /* Timer counter overflow */ uint32_t overflow; /* Timer counter overflow */
#endif #endif
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
uint64_t counter_mask; uint64_t counter_mask;
#endif #endif
}; };
@ -134,17 +134,17 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan,
* *
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
int stm32_freerun_counter(struct stm32_freerun_s *freerun, int stm32_freerun_counter(struct stm32_freerun_s *freerun,
struct timespec *ts); struct timespec *ts);
#else /* CONFIG_SCHED_TIMEKEEPING */ #else /* CONFIG_CLOCK_TIMEKEEPING */
int stm32_freerun_counter(struct stm32_freerun_s *freerun, int stm32_freerun_counter(struct stm32_freerun_s *freerun,
uint64_t *counter); uint64_t *counter);
#endif /* CONFIG_SCHED_TIMEKEEPING */ #endif /* CONFIG_CLOCK_TIMEKEEPING */
/**************************************************************************** /****************************************************************************
* Name: stm32_freerun_uninitialize * Name: stm32_freerun_uninitialize

View File

@ -272,7 +272,7 @@ void up_timer_initialize(void)
* *
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
int up_timer_gettime(FAR struct timespec *ts) int up_timer_gettime(FAR struct timespec *ts)
{ {
@ -286,7 +286,7 @@ int up_timer_getcounter(FAR uint64_t *cycles)
return stm32_freerun_counter(&g_tickless.freerun, cycles); return stm32_freerun_counter(&g_tickless.freerun, cycles);
} }
#endif /* CONFIG_SCHED_TIMEKEEPING */ #endif /* CONFIG_CLOCK_TIMEKEEPING */
/**************************************************************************** /****************************************************************************
* Name: up_timer_getmask * Name: up_timer_getmask
@ -302,13 +302,13 @@ int up_timer_getcounter(FAR uint64_t *cycles)
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
void up_timer_getmask(FAR uint64_t *mask) void up_timer_getmask(FAR uint64_t *mask)
{ {
DEBUGASSERT(mask != NULL); DEBUGASSERT(mask != NULL);
*mask = g_tickless.freerun.counter_mask; *mask = g_tickless.freerun.counter_mask;
} }
#endif /* CONFIG_SCHED_TIMEKEEPING */ #endif /* CONFIG_CLOCK_TIMEKEEPING */
/**************************************************************************** /****************************************************************************
* Name: up_timer_cancel * Name: up_timer_cancel

View File

@ -1496,11 +1496,11 @@ void up_timer_initialize(void);
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_SCHED_TICKLESS) && !defined(CONFIG_SCHED_TIMEKEEPING) #if defined(CONFIG_SCHED_TICKLESS) && !defined(CONFIG_CLOCK_TIMEKEEPING)
int up_timer_gettime(FAR struct timespec *ts); int up_timer_gettime(FAR struct timespec *ts);
#endif #endif
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
int up_timer_getcounter(FAR uint64_t *cycles); int up_timer_getcounter(FAR uint64_t *cycles);
void up_timer_getmask(FAR uint64_t *mask); void up_timer_getmask(FAR uint64_t *mask);
#endif #endif

View File

@ -215,7 +215,7 @@
#define SYS_clock_getres (__SYS_clock+1) #define SYS_clock_getres (__SYS_clock+1)
#define SYS_clock_gettime (__SYS_clock+2) #define SYS_clock_gettime (__SYS_clock+2)
#define SYS_clock_settime (__SYS_clock+3) #define SYS_clock_settime (__SYS_clock+3)
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
# define SYS_adjtime (__SYS_clock+4) # define SYS_adjtime (__SYS_clock+4)
# define __SYS_timers (__SYS_clock+5) # define __SYS_timers (__SYS_clock+5)
#else #else

View File

@ -227,7 +227,7 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz);
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta); int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta);
#endif #endif

View File

@ -171,12 +171,12 @@ config ARCH_HAVE_TIMEKEEPING
bool bool
default n default n
config SCHED_TIMEKEEPING config CLOCK_TIMEKEEPING
bool "Support timekeeping algorithms" bool "Support timekeeping algorithms"
default n default n
depends on EXPERIMENTAL && ARCH_HAVE_TIMEKEEPING depends on EXPERIMENTAL && ARCH_HAVE_TIMEKEEPING
---help--- ---help---
SCHED_TIMEKEEPING enables experimental time management algorithms. CLOCK_TIMEKEEPING enables experimental time management algorithms.
config JULIAN_TIME config JULIAN_TIME
bool "Enables Julian time conversions" bool "Enables Julian time conversions"

View File

@ -38,7 +38,7 @@ CSRCS += clock_time2ticks.c clock_abstime2ticks.c clock_ticks2time.c
CSRCS += clock_systimer.c clock_systimespec.c clock_timespec_add.c CSRCS += clock_systimer.c clock_systimespec.c clock_timespec_add.c
CSRCS += clock_timespec_subtract.c CSRCS += clock_timespec_subtract.c
ifeq ($(CONFIG_SCHED_TIMEKEEPING),y ifeq ($(CONFIG_CLOCK_TIMEKEEPING),y
CSRCS += clock_timekeeping.c CSRCS += clock_timekeeping.c
endif endif

View File

@ -79,7 +79,7 @@ extern volatile uint32_t g_system_timer;
# endif # endif
#endif #endif
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
extern struct timespec g_basetime; extern struct timespec g_basetime;
#endif #endif

View File

@ -49,7 +49,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "clock/clock.h" #include "clock/clock.h"
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
# include "clock/clock_timekeeping.h" # include "clock/clock_timekeeping.h"
#endif #endif
@ -93,7 +93,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
* reset. * reset.
*/ */
#if defined(CONFIG_SCHED_TIMEKEEPING) #if defined(CONFIG_CLOCK_TIMEKEEPING)
ret = clock_timekeeping_get_monotonic_time(tp); ret = clock_timekeeping_get_monotonic_time(tp);
#elif defined(CONFIG_SCHED_TICKLESS) #elif defined(CONFIG_SCHED_TICKLESS)
ret = up_timer_gettime(tp); ret = up_timer_gettime(tp);
@ -118,7 +118,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
* last set. * last set.
*/ */
#if defined(CONFIG_SCHED_TIMEKEEPING) #if defined(CONFIG_CLOCK_TIMEKEEPING)
ret = clock_timekeeping_get_wall_time(tp); ret = clock_timekeeping_get_wall_time(tp);
#elif defined(CONFIG_SCHED_TICKLESS) #elif defined(CONFIG_SCHED_TICKLESS)
ret = up_timer_gettime(&ts); ret = up_timer_gettime(&ts);
@ -126,7 +126,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
ret = clock_systimespec(&ts); ret = clock_systimespec(&ts);
#endif #endif
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
if (ret == OK) if (ret == OK)
{ {
/* Add the base time to this. The base time is the time-of-day /* Add the base time to this. The base time is the time-of-day
@ -151,7 +151,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
tp->tv_sec = ts.tv_sec; tp->tv_sec = ts.tv_sec;
tp->tv_nsec = ts.tv_nsec; tp->tv_nsec = ts.tv_nsec;
} }
#endif /* CONFIG_SCHED_TIMEKEEPING */ #endif /* CONFIG_CLOCK_TIMEKEEPING */
} }
else else
{ {

View File

@ -54,7 +54,7 @@
#include <nuttx/time.h> #include <nuttx/time.h>
#include "clock/clock.h" #include "clock/clock.h"
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
# include "clock/clock_timekeeping.h" # include "clock/clock_timekeeping.h"
#endif #endif
@ -175,7 +175,7 @@ static void clock_inittime(void)
{ {
/* (Re-)initialize the time value to match the RTC */ /* (Re-)initialize the time value to match the RTC */
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
#ifndef CONFIG_RTC_HIRES #ifndef CONFIG_RTC_HIRES
clock_basetime(&g_basetime); clock_basetime(&g_basetime);
#endif #endif

View File

@ -48,7 +48,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include "clock/clock.h" #include "clock/clock.h"
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
# include "clock/clock_timekeeping.h" # include "clock/clock_timekeeping.h"
#endif #endif
@ -79,7 +79,7 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp)
if (clock_id == CLOCK_REALTIME) if (clock_id == CLOCK_REALTIME)
{ {
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
/* Interrupts are disabled here so that the in-memory time /* Interrupts are disabled here so that the in-memory time
* representation and the RTC setting will be as close as * representation and the RTC setting will be as close as
* possible. * possible.

View File

@ -83,7 +83,7 @@ systime_t clock_systimer(void)
/* Get the time from the platform specific hardware */ /* Get the time from the platform specific hardware */
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
(void)up_timer_gettime(&ts); (void)up_timer_gettime(&ts);
#else #else
(void)clock_timekeeping_get_monotonic_time(&ts); (void)clock_timekeeping_get_monotonic_time(&ts);
@ -100,7 +100,7 @@ systime_t clock_systimer(void)
/* Get the time from the platform specific hardware */ /* Get the time from the platform specific hardware */
#ifndef CONFIG_SCHED_TIMEKEEPING #ifndef CONFIG_CLOCK_TIMEKEEPING
(void)up_timer_gettime(&ts); (void)up_timer_gettime(&ts);
#else #else
(void)clock_timekeeping_get_monotonic_time(&ts); (void)clock_timekeeping_get_monotonic_time(&ts);

View File

@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
#include <sys/time.h> #include <sys/time.h>
#include <stdint.h> #include <stdint.h>
@ -326,4 +326,4 @@ void clock_inittimekeeping(void)
memset(&g_clock_monotonic_time, 0, sizeof(g_clock_monotonic_time)); memset(&g_clock_monotonic_time, 0, sizeof(g_clock_monotonic_time));
} }
#endif /* CONFIG_SCHED_TIMEKEEPING */ #endif /* CONFIG_CLOCK_TIMEKEEPING */

View File

@ -144,7 +144,7 @@ static inline void sched_process_scheduler(void)
void sched_process_timer(void) void sched_process_timer(void)
{ {
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
/* Process wall time */ /* Process wall time */
clock_update_wall_time(); clock_update_wall_time();

View File

@ -53,7 +53,7 @@
#include "wdog/wdog.h" #include "wdog/wdog.h"
#include "clock/clock.h" #include "clock/clock.h"
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
# include "clock/clock_timekeeping.h" # include "clock/clock_timekeeping.h"
#endif #endif
@ -266,7 +266,7 @@ static unsigned int sched_timer_process(unsigned int ticks, bool noswitches)
unsigned int rettime = 0; unsigned int rettime = 0;
unsigned int tmp; unsigned int tmp;
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
/* Process wall time */ /* Process wall time */
clock_update_wall_time(); clock_update_wall_time();

View File

@ -1,5 +1,5 @@
"_exit","unistd.h","","void","int" "_exit","unistd.h","","void","int"
"adjtime","sys/time.h","defined(CONFIG_SCHED_TIMEKEEPING)","int","FAR const struct timeval *","FAR struct timeval *" "adjtime","sys/time.h","defined(CONFIG_CLOCK_TIMEKEEPING)","int","FAR const struct timeval *","FAR struct timeval *"
"aio_cancel","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *" "aio_cancel","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *"
"aio_fsync","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *" "aio_fsync","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *"
"aio_read","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *" "aio_read","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *"

Can't render this file because it has a wrong number of fields in line 2.

View File

@ -152,7 +152,7 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres) SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime) SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime) SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime)
#ifdef CONFIG_SCHED_TIMEKEEPING #ifdef CONFIG_CLOCK_TIMEKEEPING
SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime) SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime)
#endif #endif