Run all files modified by PR274 through nxstyle.

This commit is contained in:
Gregory Nutt 2020-02-15 07:14:17 -06:00
parent 8b5658b918
commit f5e0bb2d30
5 changed files with 13 additions and 10 deletions

View File

@ -85,6 +85,7 @@ void host_sleepuntil(uint64_t nsec)
{ {
base = now; base = now;
} }
now -= base; now -= base;
if (nsec > now + 1000) if (nsec > now + 1000)

View File

@ -379,6 +379,7 @@ void up_timer_update(void)
.tv_sec = 0, .tv_sec = 0,
.tv_nsec = NSEC_PER_TICK, .tv_nsec = NSEC_PER_TICK,
}; };
FAR sq_entry_t *entry; FAR sq_entry_t *entry;
clock_timespec_add(&g_current, &tick, &g_current); clock_timespec_add(&g_current, &tick, &g_current);

View File

@ -66,7 +66,6 @@ static int sim_rtc_rdtime(FAR struct rtc_lowerhalf_s *lower,
uint64_t nsec; uint64_t nsec;
time_t sec; time_t sec;
nsec = host_gettime(true); nsec = host_gettime(true);
sec = nsec / NSEC_PER_SEC; sec = nsec / NSEC_PER_SEC;
nsec -= sec * NSEC_PER_SEC; nsec -= sec * NSEC_PER_SEC;

View File

@ -379,7 +379,7 @@ int up_alarm_start(FAR const struct timespec *ts)
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: up_critmon_* * Name: up_critmon_*
* *
* Description: * Description:
@ -396,7 +396,7 @@ int up_alarm_start(FAR const struct timespec *ts)
* *
* The second interface simple converts an elapsed time into well known * The second interface simple converts an elapsed time into well known
* units. * units.
*****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SCHED_CRITMONITOR #ifdef CONFIG_SCHED_CRITMONITOR
uint32_t up_critmon_gettime(void) uint32_t up_critmon_gettime(void)

View File

@ -1,8 +1,8 @@
/**************************************************************************** /****************************************************************************
* include/nuttx/clock.h * include/nuttx/clock.h
* *
* Copyright (C) 2007-2009, 2011-2012, 2014, 2016-2018 Gregory Nutt. * Copyright (C) 2007-2009, 2011-2012, 2014, 2016-2018, 2020 Gregory Nutt.
All rights reserved. * All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -54,6 +54,7 @@
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
/* Efficient, direct access to OS global timer variables will be supported /* Efficient, direct access to OS global timer variables will be supported
* if the execution environment has direct access to kernel global data. * if the execution environment has direct access to kernel global data.
* The code in this execution context can access the kernel global data * The code in this execution context can access the kernel global data
@ -71,23 +72,23 @@
#undef __HAVE_KERNEL_GLOBALS #undef __HAVE_KERNEL_GLOBALS
#if defined(CONFIG_SCHED_TICKLESS) #if defined(CONFIG_SCHED_TICKLESS)
/* Case 1: There is no global timer data */ /* Case 1: There is no global timer data */
#elif defined(CONFIG_BUILD_PROTECTED) && defined(__KERNEL__) #elif defined(CONFIG_BUILD_PROTECTED) && defined(__KERNEL__)
/* Case 3: Kernel mode of protected kernel build */ /* Case 3: Kernel mode of protected kernel build */
# define __HAVE_KERNEL_GLOBALS 1 # define __HAVE_KERNEL_GLOBALS 1
#elif defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__) #elif defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__)
/* Case 3: Kernel only build */ /* Case 3: Kernel only build */
# define __HAVE_KERNEL_GLOBALS 1 # define __HAVE_KERNEL_GLOBALS 1
#elif defined(CONFIG_LIB_SYSCALL) #elif defined(CONFIG_LIB_SYSCALL)
/* Case 4: Building with SYSCALLs enabled, but not part of a kernel build */ /* Case 4: Building with SYSCALLs enabled, but not part of a kernel build */
#else #else
/* Case 2: Un-protected, non-kernel build */ /* Case 2: Un-protected, non-kernel build */
# define __HAVE_KERNEL_GLOBALS 1 # define __HAVE_KERNEL_GLOBALS 1
#endif #endif
@ -252,6 +253,7 @@ extern "C"
#endif #endif
/* Access to raw system clock ***********************************************/ /* Access to raw system clock ***********************************************/
/* Direct access to the system timer/counter is supported only if (1) the /* Direct access to the system timer/counter is supported only if (1) the
* system timer counter is available (i.e., we are not configured to use * system timer counter is available (i.e., we are not configured to use
* a hardware periodic timer), and (2) the execution environment has direct * a hardware periodic timer), and (2) the execution environment has direct