51 #include "../core/tn_common.h"
59 #if defined(__PIC32MX__)
62 #error "unknown platform"
PIC32 architecture-dependent routines.
unsigned int * _tn_arch_stack_init(TN_TaskBody *task_func, TN_UWord *stack_top, void *param)
Should initialize stack for new task and return current stack pointer.
TN_UWord * _tn_arch_stack_top_get(TN_UWord *stack_low_address, int stack_size)
Should return top of the stack, which may be either:
void tn_arch_int_en(void)
Unconditionally enable interrupts.
void tn_arch_int_dis(void)
Unconditionally disable interrupts.
void tn_arch_sr_restore(unsigned int sr)
Restore previously saved status register.
void _tn_arch_context_switch(void)
Called whenever we need to switch context to other task.
void _tn_arch_context_switch_exit(void)
Called when some task calls tn_task_exit().
void _tn_arch_system_start(void)
Should perform first context switch (to the task pointed to by tn_next_task_to_run).
int _tn_arch_inside_isr(void)
Should return 1 if ISR is currently running, 0 otherwise.
unsigned int tn_arch_sr_save_int_dis(void)
Disable interrupts and return previous value of status register, atomically.
void( TN_TaskBody)(void *param)
Prototype for task body function.
unsigned int TN_UWord
Unsigned integer type whose size is equal to the size of CPU register.