42#define PROVIDES_PM_SET_LOWEST
47#define ISR(a,b) void __attribute__((naked, interrupt (a))) b(void)
100static inline void __attribute__((always_inline))
__enter_isr(
void)
105 "bic %[mask], 0(SP)" "\n\t"
107 : [mask]
"i"(CPUOFF | SCG0 | SCG1 | OSCOFF)
112 __asm__(
"mov.w %0,r1" : :
"i"(&__stack));
119static inline void __attribute__((always_inline))
__exit_isr(
void)
133__attribute__((always_inline))
136 return (uintptr_t)__builtin_return_address(0);
static uinttxtptr_t cpu_get_caller_pc(void)
Get the last instruction's address.
thread_t * sched_run(void)
Triggers the scheduler to schedule the next thread.
volatile unsigned int sched_context_switch_request
Flag indicating whether a context switch is necessary after handling an interrupt.
static thread_t * thread_get_active(void)
Returns a pointer to the Thread Control Block of the currently running thread.
volatile int __irq_is_in
The current ISR state (inside or not)
static void __restore_context(void)
Restore the thread context from inside an ISR.
static void __enter_isr(void)
Run this code on entering interrupt routines.
static void __exit_isr(void)
Run this code on exiting interrupt routines.
static void __save_context(void)
Save the current thread context from inside an ISR.
Scheduler API definition.
char * sp
thread's stack pointer