diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-06-09 15:49:44 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-06-09 15:49:44 +0000 |
commit | 05dd8c79b40af0221973ba0ee19ee0066c3a8dde (patch) | |
tree | 6aa570fa88dbc3e31d4d6061276f3f72c21b3ff3 /nuttx/include/limits.h | |
parent | 747de88ae98ba1e232db4c61b01b114772236c02 (diff) | |
download | nuttx-05dd8c79b40af0221973ba0ee19ee0066c3a8dde.tar.gz nuttx-05dd8c79b40af0221973ba0ee19ee0066c3a8dde.tar.bz2 nuttx-05dd8c79b40af0221973ba0ee19ee0066c3a8dde.zip |
Add support for custom system timer frequency
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@274 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/limits.h')
-rw-r--r-- | nuttx/include/limits.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/nuttx/include/limits.h b/nuttx/include/limits.h index 285eea684..d32c7177a 100644 --- a/nuttx/include/limits.h +++ b/nuttx/include/limits.h @@ -114,11 +114,27 @@ #define _POSIX_RTSIG_MAX 31 #define _POSIX_SIGQUEUE_MAX 32 -/* Required for POSIX timers */ +/* Required for POSIX timers. + * + * _POSIX_DELAYTIMER_MAX is the number of timer expiration overruns. + * + * _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. + */ #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_TIMER_MAX 32 -#define _POSIX_CLOCKRES_MIN 10000000 + +#ifdef CONFIG_MSEC_PER_TICK +# define _POSIX_CLOCKRES_MIN ((CONFIG_MSEC_PER_TICK)*1000000) +#else +# define _POSIX_CLOCKRES_MIN (10*1000000) +#endif /* Required for asynchronous I/O */ |