Complete additions of portASSERT_IF_INTERRUPT_PRIORITY_INVALID() for all RX compiler ports.

This commit is contained in:
Richard Barry 2013-07-11 10:05:06 +00:00
parent 18caebf1d1
commit 5d902f2b9c
7 changed files with 74 additions and 22 deletions

View file

@ -142,10 +142,15 @@ static void vPortYield( void )
/*
* These macros should be called directly, but through the taskENTER_CRITICAL()
* and taskEXIT_CRITICAL() macros.
* and taskEXIT_CRITICAL() macros. If the RTOS is being used correctly then
* the check to ensure the IPL is not being lowered will not be needed. It is
* included to ensure assert()s triggered by using an incorrect interrupt
* priority do not result in the assert() handler inadvertently lowering the
* priority mask, and in so doing allowing the offending interrupt to continue
* triggering until stack space is exhausted.
*/
#define portENABLE_INTERRUPTS() set_ipl( 0 )
#define portDISABLE_INTERRUPTS() set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY )
#define portDISABLE_INTERRUPTS() if( get_ipl() < configMAX_SYSCALL_INTERRUPT_PRIORITY ) set_ipl( ( unsigned char ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
/* Critical nesting counts are stored in the TCB. */
#define portCRITICAL_NESTING_IN_TCB ( 1 )

View file

@ -142,10 +142,15 @@ static void vPortYield( void )
/*
* These macros should be called directly, but through the taskENTER_CRITICAL()
* and taskEXIT_CRITICAL() macros.
* and taskEXIT_CRITICAL() macros. If the RTOS is being used correctly then
* the check to ensure the IPL is not being lowered will not be needed. It is
* included to ensure assert()s triggered by using an incorrect interrupt
* priority do not result in the assert() handler inadvertently lowering the
* priority mask, and in so doing allowing the offending interrupt to continue
* triggering until stack space is exhausted.
*/
#define portENABLE_INTERRUPTS() set_ipl( 0 )
#define portDISABLE_INTERRUPTS() set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY )
#define portDISABLE_INTERRUPTS() if( get_ipl() < configMAX_SYSCALL_INTERRUPT_PRIORITY ) set_ipl( ( unsigned char ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
/* Critical nesting counts are stored in the TCB. */
#define portCRITICAL_NESTING_IN_TCB ( 1 )

View file

@ -56,19 +56,19 @@
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, and our new
fully thread aware and reentrant UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems, who sell the code with commercial support,
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems, who sell the code with commercial support,
indemnification and middleware, under the OpenRTOS brand.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
*/
@ -84,7 +84,7 @@ extern "C" {
#include "machine.h"
/*-----------------------------------------------------------
* Port specific definitions.
* Port specific definitions.
*
* The settings in this file configure FreeRTOS correctly for the
* given hardware and compiler.
@ -115,7 +115,7 @@ portSTACK_TYPE and portBASE_TYPE. */
/* Hardware specifics. */
#define portBYTE_ALIGNMENT 8 /* Could make four, according to manual. */
#define portSTACK_GROWTH -1
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
#define portNOP() nop()
#ifdef configASSERT
@ -142,10 +142,15 @@ static void vPortYield( void )
/*
* These macros should be called directly, but through the taskENTER_CRITICAL()
* and taskEXIT_CRITICAL() macros.
* and taskEXIT_CRITICAL() macros. If the RTOS is being used correctly then
* the check to ensure the IPL is not being lowered will not be needed. It is
* included to ensure assert()s triggered by using an incorrect interrupt
* priority do not result in the assert() handler inadvertently lowering the
* priority mask, and in so doing allowing the offending interrupt to continue
* triggering until stack space is exhausted.
*/
#define portENABLE_INTERRUPTS() set_ipl( 0 )
#define portDISABLE_INTERRUPTS() set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY )
#define portDISABLE_INTERRUPTS() if( get_ipl() < configMAX_SYSCALL_INTERRUPT_PRIORITY ) set_ipl( ( unsigned char ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
/* Critical nesting counts are stored in the TCB. */
#define portCRITICAL_NESTING_IN_TCB ( 1 )