28 #ifdef Clock_driver_nanoseconds_since_last_tick 29 #error "Update driver to use the timecounter instead of nanoseconds extension" 40 #if CLOCK_DRIVER_USE_FAST_IDLE && CLOCK_DRIVER_ISRS_PER_TICK 41 #error "Fast Idle PLUS n ISRs per tick is not supported" 47 #ifndef Clock_driver_support_install_isr 48 #define Clock_driver_support_install_isr(isr) 54 #ifndef Clock_driver_support_find_timer 55 #define Clock_driver_support_find_timer() 61 #ifndef Clock_driver_support_at_tick 62 #define Clock_driver_support_at_tick() 68 #ifndef Clock_driver_support_set_interrupt_affinity 69 #define Clock_driver_support_set_interrupt_affinity(online_processors) 76 #ifndef Clock_driver_timecounter_tick 77 static void Clock_driver_timecounter_tick(
void )
79 #if defined(CLOCK_DRIVER_USE_DUMMY_TIMECOUNTER) 81 #elif defined(RTEMS_SMP) && defined(CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR) 85 cpu_max = _SMP_Get_processor_maximum();
87 for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) {
90 cpu = _Per_CPU_Get_by_index( cpu_index );
92 if ( _Per_CPU_Is_boot_processor( cpu ) ) {
107 #if CLOCK_DRIVER_ISRS_PER_TICK 108 volatile uint32_t Clock_driver_isrs;
116 #ifdef Clock_driver_support_shutdown_hardware 117 #error "Clock_driver_support_shutdown_hardware() is no longer supported" 127 #if defined(BSP_FEATURE_IRQ_EXTENSION) || \ 128 (CPU_SIMPLE_VECTORED_INTERRUPTS != TRUE) 144 #if CLOCK_DRIVER_USE_FAST_IDLE 146 Clock_driver_timecounter_tick();
148 if (_SMP_Get_processor_maximum() == 1) {
150 uint64_t us_per_tick;
154 cpu_self = _Per_CPU_Get();
157 interval = (uint32_t) ((tc->tc_frequency * us_per_tick) / 1000000);
169 (*tc->tc_get_timecount)(tc),
185 #if CLOCK_DRIVER_ISRS_PER_TICK 189 if ( !Clock_driver_isrs ) {
190 Clock_driver_timecounter_tick();
192 Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK_VALUE;
199 Clock_driver_timecounter_tick();
227 Clock_driver_support_initialize_hardware();
232 #if CLOCK_DRIVER_ISRS_PER_TICK 233 Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK_VALUE;
#define Clock_driver_support_install_isr(isr)
Do nothing by default.
volatile uint32_t Clock_driver_ticks
ISRs until next clock tick.
#define Clock_driver_support_find_timer()
This method is rarely used so default it.
void _Timecounter_Tick_simple(uint32_t delta, uint32_t offset, ISR_lock_Context *lock_context)
Performs a simple timecounter tick.
struct _Thread_Control * executing
This is the thread executing on this processor.
struct timecounter * _Timecounter
The current timecounter.
Inlined Routines in the Watchdog Handler.
static __inline__ const Processor_mask * _SMP_Get_online_processors(void)
Gets all online processors.
#define _Timecounter_Acquire(lock_context)
Lock to protect the timecounter mechanic.
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_set(const Processor_mask *mask, uint32_t index)
Checks if the specified index bit of the mask is set.
#define Clock_driver_support_set_interrupt_affinity(online_processors)
Do nothing by default.
void Clock_isr(void *arg)
Clock_isr.
#define rtems_configuration_get_microseconds_per_tick()
Returns the number of microseconds per clock tick configured for this application.
struct _Thread_Control * heir
This is the heir thread for this processor.
void _Clock_Initialize(void)
Initialize the clock driver.
volatile uint32_t thread_dispatch_disable_level
The thread dispatch critical section nesting counter which is used to prevent context switches at ino...
static __inline__ void rtems_timecounter_tick(void)
Performs a timecounter tick.
Local ISR lock context for acquire and release pairs.
ISR_Vector_number rtems_vector_number
%
Constants and Structures Related with the Thread Control Block.
#define Clock_driver_support_at_tick()
Do nothing by default.
SuperCore SMP Implementation.
rtems_status_code rtems_clock_tick(void)
%
void _Watchdog_Tick(struct Per_CPU_Control *cpu)
Performs a watchdog tick.