Esempio n. 1
0
void cpu_switch_context_exit(void)
{
    active_thread = sched_threads[0];
    sched_run();

    __restore_context();
}
Esempio n. 2
0
File: cpu.c Progetto: deepfryed/RIOT
NORETURN void cpu_switch_context_exit(void)
{
    sched_active_thread = sched_threads[0];
    sched_run();

    __restore_context();

    UNREACHABLE();
}
Esempio n. 3
0
void thread_yield()
{
    __save_context();

    dINT();
    /* have active_thread point to the next thread */
    sched_run();
    eINT();

    __restore_context();
}
Esempio n. 4
0
File: cpu.c Progetto: deepfryed/RIOT
/*
 * we must prevent the compiler to generate a prologue or an epilogue
 * for thread_yield_higher(), since we rely on the RETI instruction at the end
 * of its execution, in the inlined __restore_context() sub-function
 */
__attribute__((naked)) void thread_yield_higher(void)
{
    __asm__("push r2"); /* save SR */
    __disable_irq();

    __save_context();

    /* have sched_active_thread point to the next thread */
    sched_run();

    __restore_context();

    UNREACHABLE();
}