51 #include "../core/tn_common.h"
59 #if defined(__TN_ARCH_PIC32MX__)
61 #elif defined(__TN_ARCH_PIC24_DSPIC__)
63 #elif defined(__TN_ARCH_CORTEX_M__)
66 # error "unknown platform"
291 unsigned int int_stack_size
TN_UWord * _tn_arch_stack_init(TN_TaskBody *task_func, TN_UWord *stack_top, int stack_size, void *param)
Should put initial CPU context to the provided stack pointer for new task and return current stack po...
Cortex-M0/M0+/M3/M4/M4F architecture-dependent routines.
PIC32 architecture-dependent routines.
int _tn_arch_is_int_disabled(void)
Should return 1 if system interrupts are currently disabled, 0 otherwise.
void _tn_arch_context_switch_pend(void)
Called whenever we need to switch context from one task to another.
TN_UWord * _tn_arch_stack_top_get(TN_UWord *stack_low_address, int stack_size)
Should return top of the stack.
void tn_arch_int_en(void)
Unconditionally enable interrupts.
void _tn_arch_sys_start(TN_UWord *int_stack, unsigned int int_stack_size)
Performs first context switch to the first task (_tn_next_task_to_run is already set to needed task)...
void tn_arch_int_dis(void)
Unconditionally disable system interrupts.
PIC24/dsPIC architecture-dependent routines.
int _tn_arch_inside_isr(void)
Should return 1 if system ISR is currently running, 0 otherwise.
TN_UWord * _tn_arch_stack_bottom_empty_get(TN_UWord *stack_top, int stack_size)
This function should return address of bottom empty element of stack, it is needed for software stack...
void( TN_TaskBody)(void *param)
Prototype for task body function.
TN_UWord tn_arch_sr_save_int_dis(void)
Disable system interrupts and return previous value of status register, atomically.
void _tn_arch_context_switch_now_nosave(void)
Called whenever we need to switch context to new task, but don't save current context.
void tn_arch_sr_restore(TN_UWord sr)
Restore previously saved status register.
unsigned int TN_UWord
Unsigned integer type whose size is equal to the size of CPU register.