44 #ifndef _TN_ARCH_EXAMPLE_H
45 #define _TN_ARCH_EXAMPLE_H
53 #define _TN_FFS(x) (32 - __builtin_clz((x) & (0 - (x))))
62 #define _TN_FATAL_ERROR(error_msg, ...) \
63 {__asm__ volatile(" sdbbp 0"); __asm__ volatile ("nop");}
76 #define TN_ARCH_STK_ATTR_BEFORE
87 #define TN_ARCH_STK_ATTR_AFTER __attribute__((aligned(0x8)))
93 #define TN_MIN_STACK_SIZE 36
98 #define TN_INT_WIDTH 32
112 #define TN_PRIORITIES_MAX_CNT TN_INT_WIDTH
117 #define TN_WAIT_INFINITE 0xFFFFFFFF
122 #define TN_FILL_STACK_VAL 0xFEEDFACE
134 #define TN_INTSAVE_DATA int tn_save_status_reg = 0;
143 #define TN_INTSAVE_DATA_INT TN_INTSAVE_DATA
155 #define TN_INT_DIS_SAVE() tn_save_status_reg = tn_arch_sr_save_int_dis()
167 #define TN_INT_RESTORE() tn_arch_sr_restore(tn_save_status_reg)
176 #define TN_INT_IDIS_SAVE() TN_INT_DIS_SAVE()
185 #define TN_INT_IRESTORE() TN_INT_RESTORE()
190 #define TN_IS_INT_DISABLED() ((__builtin_mfc0(12, 0) & 1) == 0)
195 #define _TN_CONTEXT_SWITCH_IPEND_IF_NEEDED() \
196 _tn_context_switch_pend_if_needed()
200 #endif // _TN_ARCH_EXAMPLE_H
unsigned int TN_UWord
Unsigned integer type whose size is equal to the size of CPU register.