summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-20 08:33:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-24 09:37:27 +0200
commit381ef5c83393d3707cf74f40f1edc2d0404c3ee6 (patch)
tree2d2322cafe7a2af779d73eeadb55c1d366b4b50e /cpukit/sapi/include
parentrtems: Simplify RTEMS_MILLISECONDS_TO_MICROSECONDS (diff)
downloadrtems-381ef5c83393d3707cf74f40f1edc2d0404c3ee6.tar.bz2
confdefs: Warn about problematic ticks per second
A non-integer clock ticks per second value may lead to inaccurate time format conversions. Update #3117. Update #3182.
Diffstat (limited to 'cpukit/sapi/include')
-rwxr-xr-xcpukit/sapi/include/confdefs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 3dfcf9b2d5..13e97c9487 100755
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -2287,6 +2287,10 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
#endif
+ #if 1000000 % CONFIGURE_MICROSECONDS_PER_TICK != 0
+ #warning "The clock ticks per second is not an integer"
+ #endif
+
#define _CONFIGURE_TICKS_PER_SECOND (1000000 / CONFIGURE_MICROSECONDS_PER_TICK)
/** The configures the number of clock ticks per timeslice. */