Changeset 9a1bab2 in rtems


Ignore:
Timestamp:
Jun 5, 2014, 9:19:32 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
041bf16
Parents:
be3c257
git-author:
Sebastian Huber <sebastian.huber@…> (06/05/14 09:19:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/05/14 12:55:16)
Message:

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.

Location:
cpukit/score
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/Makefile.am

    rbe3c257 r9a1bab2  
    131131
    132132if HAS_SMP
     133libscore_a_SOURCES += src/percpustatewait.c
    133134libscore_a_SOURCES += src/profilingsmplock.c
    134135libscore_a_SOURCES += src/schedulersmpvalidstatechanges.c
  • cpukit/score/include/rtems/score/percpu.h

    rbe3c257 r9a1bab2  
    548548
    549549/**
    550  * @brief Waits for all other processors to enter the ready to start
    551  * multitasking state with a timeout in microseconds.
    552  *
    553  * In case one processor enters the shutdown state, this function does not
    554  * return and terminates the system with the SMP_FATAL_SHUTDOWN_EARLY fatal SMP
    555  * error.
    556  *
    557  * This function should be called only in _CPU_SMP_Initialize() if required by
    558  * the CPU port or BSP.
     550 * @brief Waits for a processor to change into a non-initial state.
     551 *
     552 * This function should be called only in _CPU_SMP_Start_processor() if
     553 * required by the CPU port or BSP.
    559554 *
    560555 * @code
    561  * uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
     556 * bool _CPU_SMP_Start_processor(uint32_t cpu_index)
    562557 * {
    563  *   uint32_t cnt = MIN(get_hardware_cpu_count(), configured_cpu_count);
    564558 *   uint32_t timeout = 123456;
    565559 *
    566  *   do_some_stuff();
    567  *
    568  *   return _Per_CPU_State_wait_for_ready_to_start_multitasking(cnt, timeout);
     560 *   start_the_processor(cpu_index);
     561 *
     562 *   return _Per_CPU_State_wait_for_non_initial_state(cpu_index, timeout);
    569563 * }
    570564 * @endcode
    571565 *
    572  * In case the timeout expires the count of processors is reduced to reflect
    573  * the set of processors which is actually available at this point in time.
    574  *
    575  * @param[in] processor_count The processor count is the minimum value of the
    576  * configured count of processors and the processor count offered by the actual
    577  * hardware.
    578  * @param[in] timeout_in_us The timeout in microseconds.
    579  *
    580  * @return The count of processors available for the application in the system.
    581  * This value is less than or equal to the processor count.
    582  */
    583 uint32_t _Per_CPU_State_wait_for_ready_to_start_multitasking(
    584   uint32_t processor_count,
    585   uint32_t timeout_in_us
     566 * @param[in] cpu_index The processor index.
     567 * @param[in] timeout_in_ns The timeout in nanoseconds.  Use a value of zero to
     568 * wait forever if necessary.
     569 *
     570 * @retval true The processor is in a non-initial state.
     571 * @retval false The timeout expired before the processor reached a non-initial
     572 * state.
     573 */
     574bool _Per_CPU_State_wait_for_non_initial_state(
     575  uint32_t cpu_index,
     576  uint32_t timeout_in_ns
    586577);
    587578
Note: See TracChangeset for help on using the changeset viewer.