#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) \r
#define portNOP() nop()\r
\r
-/* The location of the software interrupt register. Software interrupts use\r
-vector 27. */\r
-#define portITU_SWINTR ( ( unsigned char * ) 0x000872E0 )\r
-#define portYIELD() *portITU_SWINTR = 0x01; nop(); nop(); nop(); nop(); nop()\r
+#pragma inline_asm vPortYield\r
+static void vPortYield( void )\r
+{\r
+ /* Save clobbered register - may not actually be necessary if inline asm\r
+ functions are considered to use the same rules as function calls by the\r
+ compiler. */\r
+ PUSH.L R5\r
+ /* Set ITU SWINTR. */\r
+ MOV.L #553696, R5\r
+ MOV.B #1, [R5]\r
+ /* Read back to ensure the value is taken before proceeding. */\r
+ MOV.L [R5], R5\r
+ /* Restore clobbered register to its previous value. */\r
+ POP R5\r
+}\r
+#define portYIELD() vPortYield()\r
#define portYIELD_FROM_ISR( x ) if( x != pdFALSE ) portYIELD()\r
\r
/*\r
/* The critical nesting functions defined within tasks.c. */\r
extern void vTaskEnterCritical( void );\r
extern void vTaskExitCritical( void );\r
-#define portENTER_CRITICAL() vTaskEnterCritical();\r
-#define portEXIT_CRITICAL() vTaskExitCritical();\r
+#define portENTER_CRITICAL() vTaskEnterCritical()\r
+#define portEXIT_CRITICAL() vTaskExitCritical()\r
\r
/* As this port allows interrupt nesting... */\r
-#define portSET_INTERRUPT_MASK_FROM_ISR() get_ipl(); set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY )\r
-#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) set_ipl( uxSavedInterruptStatus )\r
+#define portSET_INTERRUPT_MASK_FROM_ISR() get_ipl(); set_ipl( ( long ) configMAX_SYSCALL_INTERRUPT_PRIORITY )\r
+#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) set_ipl( ( long ) uxSavedInterruptStatus )\r
\r
/*-----------------------------------------------------------*/\r
\r
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
\r
+/* This macro is not appropriate for this port so is defined away. */\r
+#define portALIGNMENT_ASSERT_pxCurrentTCB( x )\r
+\r
#ifdef __cplusplus\r
}\r
#endif\r