diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-18 08:36:16 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-04 13:36:10 +0100 |
commit | 90d8567d34a6d80da04b1cb37b667a3173f584c4 (patch) | |
tree | 221e66b9da1dd9dd79d01e507f0026bfb477b810 /c/src/lib/libbsp/shared/clockdrv_shell.h | |
parent | score: Add _SMP_Before_multitasking_action() (diff) | |
download | rtems-90d8567d34a6d80da04b1cb37b667a3173f584c4.tar.bz2 |
score: Distribute clock tick to all online CPUs
Update #2554.
Diffstat (limited to 'c/src/lib/libbsp/shared/clockdrv_shell.h')
-rw-r--r-- | c/src/lib/libbsp/shared/clockdrv_shell.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/shared/clockdrv_shell.h b/c/src/lib/libbsp/shared/clockdrv_shell.h index 9bf5d9b73a..af038610a6 100644 --- a/c/src/lib/libbsp/shared/clockdrv_shell.h +++ b/c/src/lib/libbsp/shared/clockdrv_shell.h @@ -20,6 +20,7 @@ #include <bsp.h> #include <rtems/clockdrv.h> #include <rtems/score/percpu.h> +#include <rtems/score/smpimpl.h> #ifdef Clock_driver_nanoseconds_since_last_tick #error "Update driver to use the timecounter instead of nanoseconds extension" @@ -51,6 +52,13 @@ #define Clock_driver_support_at_tick() #endif +/** + * @brief Do nothing by default. + */ +#ifndef Clock_driver_support_set_interrupt_affinity + #define Clock_driver_support_set_interrupt_affinity(online_processors) +#endif + /* * A specialized clock driver may use for example rtems_timecounter_tick_simple() * instead of the default. @@ -199,6 +207,10 @@ rtems_device_driver Clock_initialize( (void) Old_ticker; Clock_driver_support_install_isr( Clock_isr, Old_ticker ); + #ifdef RTEMS_SMP + Clock_driver_support_set_interrupt_affinity( _SMP_Online_processors ); + #endif + /* * Now initialize the hardware that is the source of the tick ISR. */ |