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
119 #define TN_PRIORITIES_MAX_CNT TN_INT_WIDTH
125 #define TN_WAIT_INFINITE (TN_Timeout)0xFFFFFFFF
130 #define TN_FILL_STACK_VAL 0xFEEDFACE
142 #define TN_INTSAVE_DATA int tn_save_status_reg = 0;
151 #define TN_INTSAVE_DATA_INT TN_INTSAVE_DATA
163 #define TN_INT_DIS_SAVE() tn_save_status_reg = tn_arch_sr_save_int_dis()
175 #define TN_INT_RESTORE() tn_arch_sr_restore(tn_save_status_reg)
184 #define TN_INT_IDIS_SAVE() TN_INT_DIS_SAVE()
193 #define TN_INT_IRESTORE() TN_INT_RESTORE()
198 #define TN_IS_INT_DISABLED() ((__builtin_mfc0(12, 0) & 1) == 0)
203 #define _TN_CONTEXT_SWITCH_IPEND_IF_NEEDED() \
204 _tn_context_switch_pend_if_needed()
212 #define _TN_SIZE_BYTES_TO_UWORDS(size_in_bytes) ((size_in_bytes) >> 2)
214 #endif // _TN_ARCH_EXAMPLE_H
unsigned int TN_UIntPtr
Unsigned integer type that is able to store pointers.
unsigned int TN_UWord
Unsigned integer type whose size is equal to the size of CPU register.