[rtems commit] confdefs: CONFIGURE_MICROSECONDS_PER_TICK

Sebastian Huber sebh at rtems.org
Wed Oct 25 05:42:24 UTC 2017


Module:    rtems
Branch:    master
Commit:    0ddffb766c0c2504d4dd0545ee6f616ce3fc66e2
Changeset: http://git.rtems.org/rtems/commit/?id=0ddffb766c0c2504d4dd0545ee6f616ce3fc66e2

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Oct 24 10:31:05 2017 +0200

confdefs: CONFIGURE_MICROSECONDS_PER_TICK

Reject non-positive CONFIGURE_MICROSECONDS_PER_TICK values.

---

 cpukit/sapi/include/confdefs.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 219260e..47b7d9a 100755
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -2291,6 +2291,10 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
     #warning "The clock ticks per second is not an integer"
   #endif
 
+  #if CONFIGURE_MICROSECONDS_PER_TICK <= 0
+    #error "The CONFIGURE_MICROSECONDS_PER_TICK must be positive"
+  #endif
+
   #define _CONFIGURE_TICKS_PER_SECOND (1000000 / CONFIGURE_MICROSECONDS_PER_TICK)
 
   /** The configures the number of clock ticks per timeslice. */




More information about the vc mailing list