44 #ifndef _TN_ARCH_EXAMPLE_H 45 #define _TN_ARCH_EXAMPLE_H 53 #define _TN_FFS(x) (32 - __builtin_clz((x) & (0 - (x)))) 63 #define _TN_FATAL_ERROR(error_msg, ...) \ 64 {__asm__ volatile(" sdbbp 0"); __asm__ volatile ("nop");} 77 #define TN_ARCH_STK_ATTR_BEFORE 88 #define TN_ARCH_STK_ATTR_AFTER __attribute__((aligned(0x8))) 94 #define TN_MIN_STACK_SIZE 36 99 #define TN_INT_WIDTH 32 120 #define TN_PRIORITIES_MAX_CNT TN_INT_WIDTH 126 #define TN_WAIT_INFINITE (TN_TickCnt)0xFFFFFFFF 131 #define TN_FILL_STACK_VAL 0xFEEDFACE 143 #define TN_INTSAVE_DATA int tn_save_status_reg = 0; 152 #define TN_INTSAVE_DATA_INT TN_INTSAVE_DATA 164 #define TN_INT_DIS_SAVE() tn_save_status_reg = tn_arch_sr_save_int_dis() 176 #define TN_INT_RESTORE() tn_arch_sr_restore(tn_save_status_reg) 185 #define TN_INT_IDIS_SAVE() TN_INT_DIS_SAVE() 194 #define TN_INT_IRESTORE() TN_INT_RESTORE() 199 #define TN_IS_INT_DISABLED() ((__builtin_mfc0(12, 0) & 1) == 0) 204 #define _TN_CONTEXT_SWITCH_IPEND_IF_NEEDED() \ 205 _tn_context_switch_pend_if_needed() 213 #define _TN_SIZE_BYTES_TO_UWORDS(size_in_bytes) ((size_in_bytes) >> 2) 221 # define _TN_INLINE inline 223 # define _TN_INLINE inline 230 #define _TN_STATIC_INLINE static _TN_INLINE 238 #define _TN_VOLATILE_WORKAROUND 241 #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.