/*\r
- FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+ FreeRTOS V9.0.0rc1 - Copyright (C) 2016 Real Time Engineers Ltd.\r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vPortYield( void )\r
-{\r
- /* Set a PendSV to request a context switch. */\r
- portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;\r
-\r
- /* Barriers are normally not required but do ensure the code is completely\r
- within the specified behaviour for the architecture. */\r
- __asm volatile( "dsb" );\r
- __asm volatile( "isb" );\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
void vPortEnterCritical( void )\r
{\r
portDISABLE_INTERRUPTS();\r
uxCriticalNesting++;\r
- __asm volatile( "dsb" );\r
- __asm volatile( "isb" );\r
\r
/* This is not the interrupt safe version of the enter critical function so\r
assert() if it is being called from an interrupt context. Only API\r
}\r
/*-----------------------------------------------------------*/\r
\r
-__attribute__(( naked )) uint32_t ulPortSetInterruptMask( void )\r
-{\r
- __asm volatile \\r
- ( \\r
- " mrs r0, basepri \n" \\r
- " mov r1, %0 \n" \\r
- " msr basepri, r1 \n" \\r
- " bx lr \n" \\r
- :: "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "r0", "r1" \\r
- );\r
-\r
- /* This return will not be reached but is necessary to prevent compiler\r
- warnings. */\r
- return 0;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-__attribute__(( naked )) void vPortClearInterruptMask( uint32_t ulNewMaskValue )\r
-{\r
- __asm volatile \\r
- ( \\r
- " msr basepri, r0 \n" \\r
- " bx lr \n" \\r
- :::"r0" \\r
- );\r
-\r
- /* Just to avoid compiler warnings. */\r
- ( void ) ulNewMaskValue;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
void xPortPendSVHandler( void )\r
{\r
/* This is a naked function. */\r
executes all interrupts must be unmasked. There is therefore no need to\r
save and then restore the interrupt mask value as its value is already\r
known. */\r
- ( void ) portSET_INTERRUPT_MASK_FROM_ISR();\r
+ portDISABLE_INTERRUPTS();\r
{\r
/* Increment the RTOS tick. */\r
if( xTaskIncrementTick() != pdFALSE )\r
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;\r
}\r
}\r
- portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 );\r
+ portENABLE_INTERRUPTS();\r
}\r
/*-----------------------------------------------------------*/\r
\r