***************************************************************************\r
\r
\r
- http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
fully thread aware and reentrant UDP/IP stack.\r
\r
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
- Integrity Systems, who sell the code with commercial support, \r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems, who sell the code with commercial support,\r
indemnification and middleware, under the OpenRTOS brand.\r
- \r
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
- engineered and independently SIL3 certified version for use in safety and \r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
*/\r
\r
* Implementation of functions defined in portable.h for the PIC32MX port.\r
*----------------------------------------------------------*/\r
\r
-#ifndef __XC__\r
+#ifndef __XC\r
#error This port is designed to work with XC32. Please update your C compiler version.\r
#endif\r
\r
unsigned portBASE_TYPE uxSavedStatus;\r
\r
uxSavedStatus = uxPortSetInterruptMaskFromISR();\r
- vTaskIncrementTick();\r
+ {\r
+ if( xTaskIncrementTick() != pdFALSE )\r
+ {\r
+ /* Pend a context switch. */\r
+ _CP0_BIS_CAUSE( portCORE_SW_0 );\r
+ }\r
+ }\r
vPortClearInterruptMaskFromISR( uxSavedStatus );\r
\r
- /* If we are using the preemptive scheduler then we might want to select\r
- a different task to execute. */\r
- #if configUSE_PREEMPTION == 1\r
- _CP0_BIS_CAUSE( portCORE_SW_0 );\r
- #endif /* configUSE_PREEMPTION */\r
-\r
/* Clear timer 1 interrupt. */\r
IFS0CLR = _IFS0_T1IF_MASK;\r
}\r
\r
vPortYieldISR:\r
\r
- /* Make room for the context. First save the current status so we can\r
- manipulate it, and the cause and EPC registers so we capture their\r
- original values in case of interrupt nesting. */\r
+ /* Make room for the context. First save the current status so it can be\r
+ manipulated, and the cause and EPC registers so thier original values are\r
+ captured. */\r
mfc0 k0, _CP0_CAUSE\r
addiu sp, sp, -portCONTEXT_SIZE\r
mfc0 k1, _CP0_STATUS\r
sw s5, 40(sp)\r
sw k1, portSTATUS_STACK_LOCATION(sp)\r
\r
- /* Enable interrupts above the current priority. */\r
+ /* Interrupts above the kernel priority are going to be re-enabled. */\r
srl k0, k0, 0xa\r
ins k1, k0, 10, 6\r
ins k1, zero, 1, 4\r