mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Tidy up and comment.
This commit is contained in:
parent
2fd4047164
commit
761540892b
|
@ -54,8 +54,11 @@
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
|
||||||
|
/* Critical nesting should be initialised to a non zero value so interrupts don't
|
||||||
|
accidentally get enabled before the scheduler is started. */
|
||||||
#define portINITIAL_CRITICAL_NESTING (( portSTACK_TYPE ) 10)
|
#define portINITIAL_CRITICAL_NESTING (( portSTACK_TYPE ) 10)
|
||||||
|
|
||||||
|
/* The PSW value assigned to tasks when they start to run for the first time. */
|
||||||
#define portPSW (( portSTACK_TYPE ) 0x00000000)
|
#define portPSW (( portSTACK_TYPE ) 0x00000000)
|
||||||
|
|
||||||
/* We require the address of the pxCurrentTCB variable, but don't want to know
|
/* We require the address of the pxCurrentTCB variable, but don't want to know
|
||||||
|
@ -63,11 +66,14 @@ any details of its type. */
|
||||||
typedef void tskTCB;
|
typedef void tskTCB;
|
||||||
extern volatile tskTCB * volatile pxCurrentTCB;
|
extern volatile tskTCB * volatile pxCurrentTCB;
|
||||||
|
|
||||||
|
/* Keeps track of the nesting level of critical sections. */
|
||||||
volatile portSTACK_TYPE usCriticalNesting = portINITIAL_CRITICAL_NESTING;
|
volatile portSTACK_TYPE usCriticalNesting = portINITIAL_CRITICAL_NESTING;
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Sets up the timer to generate the tick interrupt. */
|
||||||
static void prvSetupTimerInterrupt( void );
|
static void prvSetupTimerInterrupt( void );
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
|
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
|
||||||
{
|
{
|
||||||
*pxTopOfStack = ( portSTACK_TYPE ) pxCode; /* Task function start address */
|
*pxTopOfStack = ( portSTACK_TYPE ) pxCode; /* Task function start address */
|
||||||
|
|
|
@ -127,7 +127,6 @@ extern void vPortYield( void );
|
||||||
extern void vPortStart( void );
|
extern void vPortStart( void );
|
||||||
extern void portSAVE_CONTEXT( void );
|
extern void portSAVE_CONTEXT( void );
|
||||||
extern void portRESTORE_CONTEXT( void );
|
extern void portRESTORE_CONTEXT( void );
|
||||||
//#define portYIELD() vPortYield()
|
|
||||||
#define portYIELD() __asm ( "trap 0" )
|
#define portYIELD() __asm ( "trap 0" )
|
||||||
#define portNOP() __asm ( "NOP" )
|
#define portNOP() __asm ( "NOP" )
|
||||||
extern void vTaskSwitchContext( void );
|
extern void vTaskSwitchContext( void );
|
||||||
|
@ -146,9 +145,6 @@ extern void vTaskSwitchContext( void );
|
||||||
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||||
|
|
||||||
|
|
||||||
static __interrupt void MD_INTP0(void);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue