mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Add nesting support.
This commit is contained in:
parent
a9393b891d
commit
0eae0f7549
2 changed files with 139 additions and 88 deletions
|
@ -51,6 +51,9 @@
|
|||
* Implementation of functions defined in portable.h for the PIC32MX port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/* Library includes. */
|
||||
#include <string.h>
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
@ -71,6 +74,10 @@ the first task is being restored. */
|
|||
/* Records the nesting depth of calls to portENTER_CRITICAL(). */
|
||||
unsigned portBASE_TYPE uxCriticalNesting = 0x55555555;
|
||||
|
||||
/* Records the interrupt nesting depth. This starts at one as it will be
|
||||
decremented to 0 when the first task starts. */
|
||||
volatile unsigned portBASE_TYPE uxInterruptNesting = 0x01;
|
||||
|
||||
/* The stack used by interrupt service routines that cause a context switch. */
|
||||
portSTACK_TYPE xISRStack[ configISR_STACK_SIZE ] = { 0 };
|
||||
|
||||
|
@ -180,6 +187,8 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
{
|
||||
extern void vPortStartFirstTask( void );
|
||||
|
||||
memset( xISRStack, 0x5a, configISR_STACK_SIZE * sizeof( portSTACK_TYPE ) );
|
||||
|
||||
/* Setup the timer to generate the tick. Interrupts will have been
|
||||
disabled by the time we get here. */
|
||||
prvSetupTimerInterrupt();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue