diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-05 11:19:32 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-05 14:55:16 +0200 |
commit | 9a1bab2525679abc75eb321f61e4b130f8801490 (patch) | |
tree | 01cbc61810dde5bbec4a80c26e41833902fde7b2 /cpukit/score/include/rtems/score/percpu.h | |
parent | score: Avoid NULL pointer access (diff) | |
download | rtems-9a1bab2525679abc75eb321f61e4b130f8801490.tar.bz2 |
score: _Per_CPU_State_wait_for_non_initial_state()
Replace _Per_CPU_State_wait_for_ready_to_start_multitasking() with
_Per_CPU_State_wait_for_non_initial_state(). Implement this function.
Diffstat (limited to 'cpukit/score/include/rtems/score/percpu.h')
-rw-r--r-- | cpukit/score/include/rtems/score/percpu.h | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h index e232674c30..30d61d519f 100644 --- a/cpukit/score/include/rtems/score/percpu.h +++ b/cpukit/score/include/rtems/score/percpu.h @@ -547,42 +547,33 @@ void _Per_CPU_State_change( ); /** - * @brief Waits for all other processors to enter the ready to start - * multitasking state with a timeout in microseconds. + * @brief Waits for a processor to change into a non-initial state. * - * In case one processor enters the shutdown state, this function does not - * return and terminates the system with the SMP_FATAL_SHUTDOWN_EARLY fatal SMP - * error. - * - * This function should be called only in _CPU_SMP_Initialize() if required by - * the CPU port or BSP. + * This function should be called only in _CPU_SMP_Start_processor() if + * required by the CPU port or BSP. * * @code - * uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count) + * bool _CPU_SMP_Start_processor(uint32_t cpu_index) * { - * uint32_t cnt = MIN(get_hardware_cpu_count(), configured_cpu_count); * uint32_t timeout = 123456; * - * do_some_stuff(); + * start_the_processor(cpu_index); * - * return _Per_CPU_State_wait_for_ready_to_start_multitasking(cnt, timeout); + * return _Per_CPU_State_wait_for_non_initial_state(cpu_index, timeout); * } * @endcode * - * In case the timeout expires the count of processors is reduced to reflect - * the set of processors which is actually available at this point in time. - * - * @param[in] processor_count The processor count is the minimum value of the - * configured count of processors and the processor count offered by the actual - * hardware. - * @param[in] timeout_in_us The timeout in microseconds. + * @param[in] cpu_index The processor index. + * @param[in] timeout_in_ns The timeout in nanoseconds. Use a value of zero to + * wait forever if necessary. * - * @return The count of processors available for the application in the system. - * This value is less than or equal to the processor count. + * @retval true The processor is in a non-initial state. + * @retval false The timeout expired before the processor reached a non-initial + * state. */ -uint32_t _Per_CPU_State_wait_for_ready_to_start_multitasking( - uint32_t processor_count, - uint32_t timeout_in_us +bool _Per_CPU_State_wait_for_non_initial_state( + uint32_t cpu_index, + uint32_t timeout_in_ns ); #endif /* defined( RTEMS_SMP ) */ |