diff --git a/core/include/sched.h b/core/include/sched.h index 63a27c5e7c10c18809edcbbc7d3918d25d9cc66e..67c85fa2036fbfe50dfa3a91ea353347bc398a1a 100644 --- a/core/include/sched.h +++ b/core/include/sched.h @@ -136,11 +136,7 @@ void sched_switch(uint16_t other_prio); /** * @brief Call context switching at thread exit */ -extern void thread_start_threading(void); -NORETURN static inline void cpu_switch_context_exit(void) -{ - thread_start_threading(); -} +NORETURN void cpu_switch_context_exit(void); /** * Flag indicating whether a context switch is necessary after handling an diff --git a/core/include/thread.h b/core/include/thread.h index 706f3e57bd3c3300a1336c895f114441ccb9abeb..dfa9a4fdeee1416b52646b243117486ef5065791 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -491,11 +491,6 @@ void thread_stack_print(void); */ void thread_print_stack(void); -/** - * @brief Start threading by loading a threads initial information from the stack - */ -void thread_start_threading(void) NORETURN; - #ifdef __cplusplus } #endif diff --git a/cpu/atmega_common/thread_arch.c b/cpu/atmega_common/thread_arch.c index 17c4abcdd2db367d20c0f7ccef0a75e3475a1781..d7932d55b4d3508f9e89c04a5458a5828e22c25d 100644 --- a/cpu/atmega_common/thread_arch.c +++ b/cpu/atmega_common/thread_arch.c @@ -222,8 +222,8 @@ void thread_stack_print(void) printf("stack size: %u bytes\n", size); } -void thread_start_threading(void) __attribute__((naked)); -void thread_start_threading(void) +void cpu_switch_context_exit(void) __attribute__((naked)); +void cpu_switch_context_exit(void) { sched_run(); AVR_CONTEXT_SWAP_INIT; diff --git a/cpu/cortexm_common/thread_arch.c b/cpu/cortexm_common/thread_arch.c index beff93eb4db763b3c2b21c29bfcf6113de70a1ae..7523e45a4de607105c10669074440ed326982d6f 100644 --- a/cpu/cortexm_common/thread_arch.c +++ b/cpu/cortexm_common/thread_arch.c @@ -105,7 +105,7 @@ extern uint32_t _sstack; /** * @brief Noticeable marker marking the beginning of a stack segment * - * This marker is used e.g. by *thread_start_threading* to identify the + * This marker is used e.g. by *cpu_switch_context_exit* to identify the * stacks beginning. */ #define STACK_MARKER (0x77777777) @@ -277,7 +277,7 @@ void *thread_isr_stack_start(void) return (void *)&_sstack; } -__attribute__((naked)) void NORETURN thread_start_threading(void) +__attribute__((naked)) void NORETURN cpu_switch_context_exit(void) { __asm__ volatile ( "bl irq_enable \n" /* enable IRQs to make the SVC diff --git a/cpu/mips32r2_common/thread_arch.c b/cpu/mips32r2_common/thread_arch.c index 8103336486b1d6ab1fd906d0d44a6c12dc139776..4fae163d803fad6bc195d556174a91228a3c701c 100644 --- a/cpu/mips32r2_common/thread_arch.c +++ b/cpu/mips32r2_common/thread_arch.c @@ -118,7 +118,7 @@ void thread_stack_print(void) } extern void __exception_restore(void); -void thread_start_threading(void) +void cpu_switch_context_exit(void) { unsigned int status = mips32_get_c0(C0_STATUS);