Revert "sched: Optimize dummy thread usage on SMP"
This reverts commit 20611f13ca
.
This PR introduced 2 regressions in main CI:
71977 & 71978
Let's revert it by now to get main's CI passing again.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
c60d4c2589
commit
c9ec937d71
|
@ -37,7 +37,7 @@ BUILD_ASSERT(K_LOWEST_APPLICATION_THREAD_PRIO
|
|||
#define Z_ASSERT_VALID_PRIO(prio, entry_point) __ASSERT((prio) == -1, "")
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
|
||||
extern struct k_thread _thread_dummy;
|
||||
extern struct k_thread _thread_dummies[CONFIG_MP_MAX_NUM_CPUS];
|
||||
|
||||
void z_sched_init(void);
|
||||
void z_move_thread_to_end_of_prio_q(struct k_thread *thread);
|
||||
|
|
|
@ -650,7 +650,7 @@ FUNC_NORETURN void z_cstart(void)
|
|||
LOG_CORE_INIT();
|
||||
|
||||
#if defined(CONFIG_MULTITHREADING)
|
||||
z_dummy_thread_init(&_thread_dummy);
|
||||
z_dummy_thread_init(&_thread_dummies[0]);
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
/* do any necessary initialization of static devices */
|
||||
z_device_state_init();
|
||||
|
|
|
@ -33,7 +33,7 @@ struct k_spinlock _sched_spinlock;
|
|||
/* Storage to "complete" the context switch from an invalid/incomplete thread
|
||||
* context (ex: exiting an ISR that aborted _current)
|
||||
*/
|
||||
__incoherent struct k_thread _thread_dummy;
|
||||
__incoherent struct k_thread _thread_dummies[CONFIG_MP_MAX_NUM_CPUS];
|
||||
|
||||
static void update_cache(int preempt_ok);
|
||||
static void halt_thread(struct k_thread *thread, uint8_t new_state);
|
||||
|
@ -1363,7 +1363,7 @@ static void halt_thread(struct k_thread *thread, uint8_t new_state)
|
|||
* code.
|
||||
*/
|
||||
if (dummify && !IS_ENABLED(CONFIG_ARCH_POSIX)) {
|
||||
z_dummy_thread_init(&_thread_dummy);
|
||||
z_dummy_thread_init(&_thread_dummies[_current_cpu->id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ static inline void smp_init_top(void *arg)
|
|||
/* Initialize the dummy thread struct so that
|
||||
* the scheduler can schedule actual threads to run.
|
||||
*/
|
||||
z_dummy_thread_init(&_thread_dummy);
|
||||
z_dummy_thread_init(&_thread_dummies[arch_curr_cpu()->id]);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||
|
|
Loading…
Reference in a new issue