diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-07 13:42:47 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-07 13:42:47 -0600 |
commit | c1603e96719150625a8f53748703dd83e9681ede (patch) | |
tree | da40cc56c6fb975108cf3c607f183aaa129cb6f9 /nuttx/include/limits.h | |
parent | 391b1d290aaedcb048c1c97d905f9ae9e9af0795 (diff) | |
download | px4-nuttx-c1603e96719150625a8f53748703dd83e9681ede.tar.gz px4-nuttx-c1603e96719150625a8f53748703dd83e9681ede.tar.bz2 px4-nuttx-c1603e96719150625a8f53748703dd83e9681ede.zip |
Change CONFIG_MSEC_PER_TICK to CONFIG_USEC_PER_TICK. This gives more options for system timers in general, but more importantly, let's us realize higher resolution for the case of CONFIG_SCHED_TICKLESS=y -- of course, at the risk of some new interger overvflow problems
Diffstat (limited to 'nuttx/include/limits.h')
-rw-r--r-- | nuttx/include/limits.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nuttx/include/limits.h b/nuttx/include/limits.h index 4d959d153..781901999 100644 --- a/nuttx/include/limits.h +++ b/nuttx/include/limits.h @@ -1,7 +1,7 @@ /******************************************************************************** * include/limits.h * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -149,18 +149,19 @@ * * _POSIX_TIMER_MAX is the per-process number of timers. * - * _POSIX_CLOCKRES_MIN is the resolution of the CLOCK_REALTIME clock in nanoseconds. - * CLOCK_REALTIME is controlled by the NuttX system time. The default value is the - * system timer which has a resolution of 10 milliseconds. This default setting can - * be overridden by defining the clock interval in milliseconds as CONFIG_MSEC_PER_TICK - * in the board configuration file. + * _POSIX_CLOCKRES_MIN is the resolution of the CLOCK_REALTIME clock in + * nanoseconds. CLOCK_REALTIME is controlled by the NuttX system time. + * The default value is the system timer which has a resolution of 1000 + * microseconds. This default setting can be overridden by defining the + * clock interval in microseconds as CONFIG_USEC_PER_TICK in the NuttX + * configuration file. */ #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_TIMER_MAX 32 -#ifdef CONFIG_MSEC_PER_TICK -# define _POSIX_CLOCKRES_MIN ((CONFIG_MSEC_PER_TICK)*1000000) +#ifdef CONFIG_USEC_PER_TICK +# define _POSIX_CLOCKRES_MIN ((CONFIG_USEC_PER_TICK)*1000) #else # define _POSIX_CLOCKRES_MIN (10*1000000) #endif |