#define portPRIGROUP_SHIFT ( 8UL )\r
\r
/* Masks off all bits but the VECTACTIVE bits in the ICSR register. */\r
-#define portVECTACTIVE_MASK ( 0x1FUL )\r
+#define portVECTACTIVE_MASK ( 0xFFUL )\r
\r
/* Constants required to manipulate the VFP. */\r
#define portFPCCR ( ( volatile uint32_t * ) 0xe000ef34 ) /* Floating point context control register. */\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
+\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
+ assert() if it is being called from an interrupt context. Only API\r
functions that end in "FromISR" can be used in an interrupt. Only assert if\r
the critical nesting count is 1 to protect against recursive calls if the\r
assert function also uses a critical section. */\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
" stmdb sp!, {r3} \n"\r
" mov r0, %0 \n"\r
" msr basepri, r0 \n"\r
+ " dsb \n"\r
+ " isb \n"\r
" bl vTaskSwitchContext \n"\r
" mov r0, #0 \n"\r
" msr basepri, r0 \n"\r