mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Continue work on RX600 port - work in progress. Added the SET/CLEAR from ISR macros.
This commit is contained in:
parent
21898cc9d9
commit
383f0b0f2f
|
@ -96,8 +96,6 @@ static void prvStartFirstTask( void );
|
||||||
|
|
||||||
extern void *pxCurrentTCB;
|
extern void *pxCurrentTCB;
|
||||||
|
|
||||||
unsigned char ucIPLToRestore = 0;
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -200,29 +198,6 @@ void vTickISR( void )
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vPortSetInterruptMask( void )
|
|
||||||
{
|
|
||||||
unsigned char ucPreviousIPL;
|
|
||||||
|
|
||||||
/* Store the current IPL to ensure it is restored correctly later if it is
|
|
||||||
not currently 0. This is a stack variable, so there should not be a race
|
|
||||||
condition even if there is an interrupt or context switch before the new
|
|
||||||
IPL value gets set. */
|
|
||||||
ucPreviousIPL = get_ipl();
|
|
||||||
|
|
||||||
/* Set the mask up to the max syscall priority. */
|
|
||||||
set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY );
|
|
||||||
|
|
||||||
/* Now the mask is set there will not be a context switch, so the previous
|
|
||||||
and current IPL values can be compared. This ensures against the IPL being
|
|
||||||
set back to zero too early when critical sections nest. */
|
|
||||||
if( ucPreviousIPL < configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
|
||||||
{
|
|
||||||
ucIPLToRestore = ucPreviousIPL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
#pragma inline_asm prvStartFirstTask
|
#pragma inline_asm prvStartFirstTask
|
||||||
static void prvStartFirstTask( void )
|
static void prvStartFirstTask( void )
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,9 +109,11 @@ extern void vTaskSwitchContext( void );
|
||||||
* These macros should be called directly, but through the taskENTER_CRITICAL()
|
* These macros should be called directly, but through the taskENTER_CRITICAL()
|
||||||
* and taskEXIT_CRITICAL() macros.
|
* and taskEXIT_CRITICAL() macros.
|
||||||
*/
|
*/
|
||||||
extern unsigned char ucIPLToRestore;
|
#define portENABLE_INTERRUPTS() set_ipl( 0 )
|
||||||
#define portENABLE_INTERRUPTS() set_ipl( ucIPLToRestore )
|
#define portDISABLE_INTERRUPTS() set_ipl( configKERNEL_INTERRUPT_PRIORITY )
|
||||||
#define portDISABLE_INTERRUPTS() vPortSetInterruptMask()
|
|
||||||
|
#define portSET_INTERRUPT_MASK_FROM_ISR() get_ipl(); set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||||
|
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) set_ipl( uxSavedInterruptStatus )
|
||||||
|
|
||||||
/* Critical nesting counts are stored in the TCB. */
|
/* Critical nesting counts are stored in the TCB. */
|
||||||
#define portCRITICAL_NESTING_IN_TCB ( 1 )
|
#define portCRITICAL_NESTING_IN_TCB ( 1 )
|
||||||
|
|
Loading…
Reference in a new issue