From: richardbarry Date: Sat, 29 Jan 2011 15:42:51 +0000 (+0000) Subject: Set the software interrupt priority to use configKERNEL_INTERRUPT_PRIORITY rather... X-Git-Tag: V7.0.0~81 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8baa3bc6bf633274acf410a834eb4fd2ad5721dd;p=freertos Set the software interrupt priority to use configKERNEL_INTERRUPT_PRIORITY rather than being hard coded to 1. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1268 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/MPLAB/PIC32MX/port.c b/Source/portable/MPLAB/PIC32MX/port.c index b7c23bfaf..ed860b2b7 100644 --- a/Source/portable/MPLAB/PIC32MX/port.c +++ b/Source/portable/MPLAB/PIC32MX/port.c @@ -85,11 +85,19 @@ portSTACK_TYPE xISRStack[ configISR_STACK_SIZE ] = { 0 }; the callers stack, as some functions seem to want to do this. */ const portBASE_TYPE * const xISRStackTop = &( xISRStack[ configISR_STACK_SIZE - 7 ] ); -/* Place the prototype here to ensure the interrupt vector is correctly installed. */ +/* + * Place the prototype here to ensure the interrupt vector is correctly installed. + * Note that because the interrupt is written in assembly, the IPL setting in the + * following line of code has no effect. The interrupt priority is set by the + * call to ConfigIntTimer1() in prvSetupTimerInterrupt(). + */ extern void __attribute__( (interrupt(ipl1), vector(_TIMER_1_VECTOR))) vT1InterruptHandler( void ); /* - * The software interrupt handler that performs the yield. + * The software interrupt handler that performs the yield. Note that, because + * the interrupt is written in assembly, the IPL setting in the following line of + * code has no effect. The interrupt priority is set by the call to + * mConfigIntCoreSW0() in xPortStartScheduler(). */ void __attribute__( (interrupt(ipl1), vector(_CORE_SOFTWARE_0_VECTOR))) vPortYieldISR( void ); @@ -155,7 +163,7 @@ extern void vPortStartFirstTask( void ); extern void *pxCurrentTCB; /* Setup the software interrupt. */ - mConfigIntCoreSW0( CSW_INT_ON | CSW_INT_PRIOR_1 | CSW_INT_SUB_PRIOR_0 ); + mConfigIntCoreSW0( CSW_INT_ON | configKERNEL_INTERRUPT_PRIORITY | CSW_INT_SUB_PRIOR_0 ); /* Setup the timer to generate the tick. Interrupts will have been disabled by the time we get here. */