44 #ifndef _TN_ARCH_EXAMPLE_H
45 #define _TN_ARCH_EXAMPLE_H
52 #define _TN_FFS(x) (32 - __builtin_clz((x) & (0 - (x))))
61 #define _TN_FATAL_ERROR(error_msg, ...) \
62 {__asm__ volatile(" sdbbp 0"); __asm__ volatile ("nop");}
75 #define TN_ARCH_STK_ATTR_BEFORE
86 #define TN_ARCH_STK_ATTR_AFTER __attribute__((aligned(0x8)))
92 #define TN_MIN_STACK_SIZE 36
97 #define TN_INT_WIDTH 32
112 #define TN_PRIORITIES_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 #endif // _TN_ARCH_EXAMPLE_H
unsigned int TN_UWord
Unsigned integer type whose size is equal to the size of CPU register.