mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 16:05:03 +08:00
rtems: Add rtems_scheduler_get_processor()
Add rtems_scheduler_get_processor() as a replacement for rtems_get_current_processor(). The rtems_get_current_processor() is a bit orphaned. Adopt it by the Scheduler Manager. This is in line with the glibc sched_getcpu() function. Deprecate rtems_get_current_processor(). Update #3731.
This commit is contained in:
@@ -69,7 +69,7 @@ static void restart_interrupt(void *arg)
|
||||
_SMP_barrier_State_initialize(&bs);
|
||||
_SMP_barrier_Wait(&restart_barrier, &bs, _SMP_Processor_count);
|
||||
|
||||
cpu_self_index = rtems_get_current_processor();
|
||||
cpu_self_index = rtems_scheduler_get_processor();
|
||||
thread_index = cpu_self_index % QORIQ_THREAD_COUNT;
|
||||
|
||||
if (cpu_self_index == 0) {
|
||||
|
||||
@@ -48,7 +48,7 @@ void bsp_fatal_extension(
|
||||
* processor.
|
||||
*/
|
||||
uint32_t max_wait = 1234567;
|
||||
uint32_t self_cpu = rtems_get_current_processor();
|
||||
uint32_t self_cpu = rtems_scheduler_get_processor();
|
||||
uint32_t cpu_count = rtems_get_processor_count();
|
||||
uint32_t halt_mask = 0;
|
||||
uint32_t i;
|
||||
|
||||
Reference in New Issue
Block a user