summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/smp.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-14 14:00:38 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-17 13:09:49 +0200
commit39e51758c86754cef5ba4521c0c36578521f73d0 (patch)
treea87255c5c0592b876106da50b939dedd471b7d5a /cpukit/score/include/rtems/score/smp.h
parentsmp: Delete RTEMS_BSP_SMP_CONTEXT_SWITCH_NECESSARY (diff)
downloadrtems-39e51758c86754cef5ba4521c0c36578521f73d0.tar.bz2
smp: Add and use _CPU_SMP_Get_current_processor()
Add and use _SMP_Get_current_processor() and rtems_smp_get_current_processor(). Delete bsp_smp_interrupt_cpu(). Change type of current processor index from int to uint32_t to match _SMP_Processor_count type.
Diffstat (limited to 'cpukit/score/include/rtems/score/smp.h')
-rw-r--r--cpukit/score/include/rtems/score/smp.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/smp.h b/cpukit/score/include/rtems/score/smp.h
index a01515673f..fedf9ab6d7 100644
--- a/cpukit/score/include/rtems/score/smp.h
+++ b/cpukit/score/include/rtems/score/smp.h
@@ -71,7 +71,7 @@ extern "C" {
* @param[in] cpu The target processor of the message.
* @param[in] message The message.
*/
-void _SMP_Send_message( int cpu, uint32_t message );
+void _SMP_Send_message( uint32_t cpu, uint32_t message );
/**
* @brief Request of others CPUs.
@@ -116,6 +116,16 @@ void _SMP_Request_other_cores_to_shutdown(void);
/** @} */
+#if defined( RTEMS_SMP )
+ RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
+ _SMP_Get_current_processor( void )
+ {
+ return _CPU_SMP_Get_current_processor();
+ }
+#else
+ #define _SMP_Get_current_processor() ( ( uint32_t ) 0 )
+#endif
+
#ifdef __cplusplus
}
#endif