diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-03 13:37:14 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-04 13:36:09 +0100 |
commit | 5b0d2c1965e1dab2915231866aaa5623ced66330 (patch) | |
tree | e425e0eb73815b874efbd946c80047341f304793 /cpukit/score/include/rtems/score/smpimpl.h | |
parent | score: Add _Per_CPU_Is_boot_processor() (diff) | |
download | rtems-5b0d2c1965e1dab2915231866aaa5623ced66330.tar.bz2 |
score: Add _SMP_Before_multitasking_action()
The use case for this is the Cortex-A9 MPCore which has per-processor
registers (only accessible by a particular processor) for the global
timer used by the clock driver. This might be useful for other drivers
as well.
Update #2554.
Diffstat (limited to 'cpukit/score/include/rtems/score/smpimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/smpimpl.h | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/smpimpl.h b/cpukit/score/include/rtems/score/smpimpl.h index 386216fdfc..59a99ec6b3 100644 --- a/cpukit/score/include/rtems/score/smpimpl.h +++ b/cpukit/score/include/rtems/score/smpimpl.h @@ -235,7 +235,7 @@ void _SMP_Send_message_multicast( unsigned long message ); -typedef void ( *SMP_Multicast_action_handler )( void *arg ); +typedef void ( *SMP_Action_handler )( void *arg ); /** * @brief Initiates a SMP multicast action to a set of processors. @@ -250,10 +250,54 @@ typedef void ( *SMP_Multicast_action_handler )( void *arg ); void _SMP_Multicast_action( const size_t setsize, const cpu_set_t *cpus, - SMP_Multicast_action_handler handler, + SMP_Action_handler handler, void *arg ); +/** + * @brief Executes a handler with argument on the specified processor on behalf + * of the boot processor. + * + * The calling processor must be the boot processor. In case the specified + * processor is not online or not in the + * PER_CPU_STATE_READY_TO_START_MULTITASKING state, then no action is + * performed. + * + * @param cpu The processor to execute the action. + * @param handler The handler of the action. + * @param arg The argument of the action. + * + * @retval true The handler executed on the specified processor. + * @retval false Otherwise. + * + * @see _SMP_Before_multitasking_action_broadcast(). + */ +bool _SMP_Before_multitasking_action( + Per_CPU_Control *cpu, + SMP_Action_handler handler, + void *arg +); + +/** + * @brief Executes a handler with argument on all online processors except the + * boot processor on behalf of the boot processor. + * + * The calling processor must be the boot processor. + * + * @param handler The handler of the action. + * @param arg The argument of the action. + * + * @retval true The handler executed on all online processors except the boot + * processor. + * @retval false Otherwise. + * + * @see _SMP_Before_multitasking_action(). + */ +bool _SMP_Before_multitasking_action_broadcast( + SMP_Action_handler handler, + void *arg +); + #endif /* defined( RTEMS_SMP ) */ /** |