Go to the documentation of this file.
88 #define portFLOAT float
89 #define portDOUBLE double
91 #define portSHORT short
92 #define portSTACK_TYPE unsigned long
93 #define portBASE_TYPE long
95 #if( configUSE_16_BIT_TICKS == 1 )
97 #define portMAX_DELAY ( portTickType ) 0xffff
100 #define portMAX_DELAY ( portTickType ) 0xffffffff
105 #define portBYTE_ALIGNMENT 8
106 #define portSTACK_GROWTH -1
107 #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
111 #define portIPL_SHIFT ( 10UL )
112 #define portALL_IPL_BITS ( 0x3fUL << portIPL_SHIFT )
113 #define portSW0_BIT ( 0x01 << 8 )
124 #define portDISABLE_INTERRUPTS() \
126 unsigned long ulStatus; \
129 ulStatus = _CP0_GET_STATUS(); \
132 if( ( ( ulStatus & portALL_IPL_BITS ) >> portIPL_SHIFT ) < configMAX_SYSCALL_INTERRUPT_PRIORITY ) \
134 ulStatus &= ~portALL_IPL_BITS; \
135 _CP0_SET_STATUS( ( ulStatus | ( configMAX_SYSCALL_INTERRUPT_PRIORITY << portIPL_SHIFT ) ) ); \
139 #define portDISABLE_INTERRUPTS() \
141 unsigned long ulStatus; \
144 ulStatus = _CP0_GET_STATUS(); \
145 ulStatus &= ~portALL_IPL_BITS; \
146 _CP0_SET_STATUS( ( ulStatus | ( configMAX_SYSCALL_INTERRUPT_PRIORITY << portIPL_SHIFT ) ) ); \
150 #define portENABLE_INTERRUPTS() \
152 unsigned long ulStatus; \
155 ulStatus = _CP0_GET_STATUS(); \
156 ulStatus &= ~portALL_IPL_BITS; \
157 _CP0_SET_STATUS( ulStatus ); \
163 #define portCRITICAL_NESTING_IN_TCB 1
164 #define portENTER_CRITICAL() vTaskEnterCritical()
165 #define portEXIT_CRITICAL() vTaskExitCritical()
169 #define portSET_INTERRUPT_MASK_FROM_ISR() uxPortSetInterruptMaskFromISR()
170 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) vPortClearInterruptMaskFromISR( uxSavedStatusRegister )
172 #if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
175 #if( configMAX_PRIORITIES > 32 )
176 #error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.
180 #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )
181 #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )
185 #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31 - _clz( ( uxReadyPriorities ) ) )
193 #define portYIELD() \
195 unsigned long ulCause; \
198 ulCause = _CP0_GET_CAUSE(); \
199 ulCause |= portSW0_BIT; \
200 _CP0_SET_CAUSE( ulCause ); \
204 #define portCURRENT_INTERRUPT_PRIORITY ( ( _CP0_GET_STATUS() & portALL_IPL_BITS ) >> portIPL_SHIFT )
205 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() configASSERT( portCURRENT_INTERRUPT_PRIORITY <= configMAX_SYSCALL_INTERRUPT_PRIORITY )
209 #define portNOP() asm volatile ( "nop" )
214 #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__((noreturn))
215 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
218 #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) \
225 #define portREMOVE_STATIC_QUALIFIER