mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-17 10:33:49 +01:00
cpu/native: fix build with !core_thread
This commit is contained in:
parent
112e378fcc
commit
cb76cc17e9
@ -156,7 +156,8 @@ void isr_cpu_switch_context_exit(void)
|
|||||||
ucontext_t *ctx;
|
ucontext_t *ctx;
|
||||||
|
|
||||||
DEBUG("isr_cpu_switch_context_exit\n");
|
DEBUG("isr_cpu_switch_context_exit\n");
|
||||||
if ((sched_context_switch_request == 1) || (thread_get_active() == NULL)) {
|
if (((sched_context_switch_request == 1) || (thread_get_active() == NULL))
|
||||||
|
&& IS_USED(MODULE_CORE_THREAD)) {
|
||||||
sched_run();
|
sched_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +211,11 @@ void isr_thread_yield(void)
|
|||||||
native_irq_handler();
|
native_irq_handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!IS_USED(MODULE_CORE_THREAD)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sched_run();
|
sched_run();
|
||||||
|
|
||||||
/* Use intermediate cast to uintptr_t to silence -Wcast-align.
|
/* Use intermediate cast to uintptr_t to silence -Wcast-align.
|
||||||
* stacks are manually word aligned in thread_static_init() */
|
* stacks are manually word aligned in thread_static_init() */
|
||||||
ucontext_t *ctx = (ucontext_t *)(uintptr_t)(thread_get_active()->sp);
|
ucontext_t *ctx = (ucontext_t *)(uintptr_t)(thread_get_active()->sp);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user