mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-25 16:38:11 +08:00
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.
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user