mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Simplify the assert that checks if a non-ISR safe function is called from an ISR in the GCC Cortex-A9 port.
This commit is contained in:
parent
d45f18cc8d
commit
4723209074
|
@ -110,10 +110,6 @@
|
||||||
#error configMAX_API_CALL_INTERRUPT_PRIORITY must be greater than ( configUNIQUE_INTERRUPT_PRIORITIES / 2 )
|
#error configMAX_API_CALL_INTERRUPT_PRIORITY must be greater than ( configUNIQUE_INTERRUPT_PRIORITIES / 2 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Used to check non ISR safe API functions are not called from inside an
|
|
||||||
ISR. */
|
|
||||||
#define portASSERT_IF_IN_INTERRUPT() configASSERT( ( portICCRPR_RUNNING_PRIORITY_REGISTER == 0xffUL ) || ( portICCRPR_RUNNING_PRIORITY_REGISTER == portLOWEST_INTERRUPT_PRIORITY ) )
|
|
||||||
|
|
||||||
/* Some vendor specific files default configCLEAR_TICK_INTERRUPT() in
|
/* Some vendor specific files default configCLEAR_TICK_INTERRUPT() in
|
||||||
portmacro.h. */
|
portmacro.h. */
|
||||||
#ifndef configCLEAR_TICK_INTERRUPT
|
#ifndef configCLEAR_TICK_INTERRUPT
|
||||||
|
@ -375,10 +371,6 @@ void vPortEndScheduler( void )
|
||||||
|
|
||||||
void vPortEnterCritical( void )
|
void vPortEnterCritical( void )
|
||||||
{
|
{
|
||||||
/* This is not the interrupt safe version of the enter critical function.
|
|
||||||
Only API functions that end in "FromISR" can be used in an interrupt. */
|
|
||||||
portASSERT_IF_IN_INTERRUPT();
|
|
||||||
|
|
||||||
/* Mask interrupts up to the max syscall interrupt priority. */
|
/* Mask interrupts up to the max syscall interrupt priority. */
|
||||||
ulPortSetInterruptMask();
|
ulPortSetInterruptMask();
|
||||||
|
|
||||||
|
@ -386,15 +378,20 @@ void vPortEnterCritical( void )
|
||||||
directly. Increment ulCriticalNesting to keep a count of how many times
|
directly. Increment ulCriticalNesting to keep a count of how many times
|
||||||
portENTER_CRITICAL() has been called. */
|
portENTER_CRITICAL() has been called. */
|
||||||
ulCriticalNesting++;
|
ulCriticalNesting++;
|
||||||
|
|
||||||
|
/* This is not the interrupt safe version of the enter critical function.
|
||||||
|
Only API functions that end in "FromISR" can be used in an interrupt. The
|
||||||
|
test of ulCriticalNesting() guards against recursive calls to assert in the
|
||||||
|
case that assert itself contains a call to taskENTER_CRITICAL. */
|
||||||
|
if( ulCriticalNesting == 1 )
|
||||||
|
{
|
||||||
|
configASSERT( ulPortInterruptNesting == 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vPortExitCritical( void )
|
void vPortExitCritical( void )
|
||||||
{
|
{
|
||||||
/* This is not the interrupt safe version of the enter critical function.
|
|
||||||
Only API functions that end in "FromISR" can be used in an interrupt. */
|
|
||||||
portASSERT_IF_IN_INTERRUPT();
|
|
||||||
|
|
||||||
if( ulCriticalNesting > portNO_CRITICAL_NESTING )
|
if( ulCriticalNesting > portNO_CRITICAL_NESTING )
|
||||||
{
|
{
|
||||||
/* Decrement the nesting count as the critical section is being
|
/* Decrement the nesting count as the critical section is being
|
||||||
|
|
Loading…
Reference in a new issue