summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-20 08:31:36 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-24 09:37:22 +0200
commit27cfe7c86ba0801f4961871869ec4e691ca694f3 (patch)
treec273dd3776caa064ea60f910411329369b66cc39 /cpukit/sapi/include
parentscore: Add _Thread_Add_timeout_ticks() (diff)
downloadrtems-27cfe7c86ba0801f4961871869ec4e691ca694f3.tar.bz2
score: Add _Watchdog_Ticks_per_second
This value is frequently used. Avoid the function call overhead and the integer division at run-time. 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 a64170bdff..3dfcf9b2d5 100755
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -2287,6 +2287,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
#endif
+ #define _CONFIGURE_TICKS_PER_SECOND (1000000 / CONFIGURE_MICROSECONDS_PER_TICK)
+
/** The configures the number of clock ticks per timeslice. */
#ifndef CONFIGURE_TICKS_PER_TIMESLICE
#define CONFIGURE_TICKS_PER_TIMESLICE 50
@@ -3102,6 +3104,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
const size_t _Thread_Control_add_on_count =
RTEMS_ARRAY_SIZE( _Thread_Control_add_ons );
+ const uint32_t _Watchdog_Ticks_per_second = _CONFIGURE_TICKS_PER_SECOND;
+
/**
* This is the Classic API Configuration Table.
*/