mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-24 23:42:10 -04:00
Add comments to the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() calls in the core queue.c and tasks.c files.
This commit is contained in:
parent
5d902f2b9c
commit
c9d9bddc3c
|
@ -940,6 +940,21 @@ xQUEUE *pxQueue;
|
||||||
configASSERT( pxQueue );
|
configASSERT( pxQueue );
|
||||||
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );
|
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );
|
||||||
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
||||||
|
|
||||||
|
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||||
|
system call (or maximum API call) interrupt priority. Interrupts that are
|
||||||
|
above the maximum system call priority are keep permanently enabled, even
|
||||||
|
when the RTOS kernel is in a critical section, but cannot make any calls to
|
||||||
|
FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h
|
||||||
|
then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion
|
||||||
|
failure if a FreeRTOS API function is called from an interrupt that has been
|
||||||
|
assigned a priority above the configured maximum system call priority.
|
||||||
|
Only FreeRTOS functions that end in FromISR can be called from interrupts
|
||||||
|
that have been assigned a priority at or (logically) below the maximum
|
||||||
|
system call interrupt priority. FreeRTOS maintains a separate interrupt
|
||||||
|
safe API to ensure interrupt entry is as fast and as simple as possible.
|
||||||
|
More information (albeit Cortex-M specific) is provided on the following
|
||||||
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
/* Similar to xQueueGenericSend, except we don't block if there is no room
|
/* Similar to xQueueGenericSend, except we don't block if there is no room
|
||||||
|
@ -1189,6 +1204,21 @@ xQUEUE *pxQueue;
|
||||||
pxQueue = ( xQUEUE * ) xQueue;
|
pxQueue = ( xQUEUE * ) xQueue;
|
||||||
configASSERT( pxQueue );
|
configASSERT( pxQueue );
|
||||||
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );
|
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );
|
||||||
|
|
||||||
|
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||||
|
system call (or maximum API call) interrupt priority. Interrupts that are
|
||||||
|
above the maximum system call priority are keep permanently enabled, even
|
||||||
|
when the RTOS kernel is in a critical section, but cannot make any calls to
|
||||||
|
FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h
|
||||||
|
then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion
|
||||||
|
failure if a FreeRTOS API function is called from an interrupt that has been
|
||||||
|
assigned a priority above the configured maximum system call priority.
|
||||||
|
Only FreeRTOS functions that end in FromISR can be called from interrupts
|
||||||
|
that have been assigned a priority at or (logically) below the maximum
|
||||||
|
system call interrupt priority. FreeRTOS maintains a separate interrupt
|
||||||
|
safe API to ensure interrupt entry is as fast and as simple as possible.
|
||||||
|
More information (albeit Cortex-M specific) is provided on the following
|
||||||
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
|
@ -1251,6 +1281,21 @@ xQUEUE *pxQueue;
|
||||||
pxQueue = ( xQUEUE * ) xQueue;
|
pxQueue = ( xQUEUE * ) xQueue;
|
||||||
configASSERT( pxQueue );
|
configASSERT( pxQueue );
|
||||||
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );
|
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );
|
||||||
|
|
||||||
|
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||||
|
system call (or maximum API call) interrupt priority. Interrupts that are
|
||||||
|
above the maximum system call priority are keep permanently enabled, even
|
||||||
|
when the RTOS kernel is in a critical section, but cannot make any calls to
|
||||||
|
FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h
|
||||||
|
then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion
|
||||||
|
failure if a FreeRTOS API function is called from an interrupt that has been
|
||||||
|
assigned a priority above the configured maximum system call priority.
|
||||||
|
Only FreeRTOS functions that end in FromISR can be called from interrupts
|
||||||
|
that have been assigned a priority at or (logically) below the maximum
|
||||||
|
system call interrupt priority. FreeRTOS maintains a separate interrupt
|
||||||
|
safe API to ensure interrupt entry is as fast and as simple as possible.
|
||||||
|
More information (albeit Cortex-M specific) is provided on the following
|
||||||
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
|
|
|
@ -1176,6 +1176,23 @@ tskTCB * pxNewTCB;
|
||||||
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
||||||
|
|
||||||
configASSERT( xTaskToResume );
|
configASSERT( xTaskToResume );
|
||||||
|
|
||||||
|
/* RTOS ports that support interrupt nesting have the concept of a
|
||||||
|
maximum system call (or maximum API call) interrupt priority.
|
||||||
|
Interrupts that are above the maximum system call priority are keep
|
||||||
|
permanently enabled, even when the RTOS kernel is in a critical section,
|
||||||
|
but cannot make any calls to FreeRTOS API functions. If configASSERT()
|
||||||
|
is defined in FreeRTOSConfig.h then
|
||||||
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion
|
||||||
|
failure if a FreeRTOS API function is called from an interrupt that has
|
||||||
|
been assigned a priority above the configured maximum system call
|
||||||
|
priority. Only FreeRTOS functions that end in FromISR can be called
|
||||||
|
from interrupts that have been assigned a priority at or (logically)
|
||||||
|
below the maximum system call interrupt priority. FreeRTOS maintains a
|
||||||
|
separate interrupt safe API to ensure interrupt entry is as fast and as
|
||||||
|
simple as possible. More information (albeit Cortex-M specific) is
|
||||||
|
provided on the following link:
|
||||||
|
http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
pxTCB = ( tskTCB * ) xTaskToResume;
|
pxTCB = ( tskTCB * ) xTaskToResume;
|
||||||
|
@ -1415,6 +1432,20 @@ portTickType xTaskGetTickCountFromISR( void )
|
||||||
portTickType xReturn;
|
portTickType xReturn;
|
||||||
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
||||||
|
|
||||||
|
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||||
|
system call (or maximum API call) interrupt priority. Interrupts that are
|
||||||
|
above the maximum system call priority are keep permanently enabled, even
|
||||||
|
when the RTOS kernel is in a critical section, but cannot make any calls to
|
||||||
|
FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h
|
||||||
|
then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion
|
||||||
|
failure if a FreeRTOS API function is called from an interrupt that has been
|
||||||
|
assigned a priority above the configured maximum system call priority.
|
||||||
|
Only FreeRTOS functions that end in FromISR can be called from interrupts
|
||||||
|
that have been assigned a priority at or (logically) below the maximum
|
||||||
|
system call interrupt priority. FreeRTOS maintains a separate interrupt
|
||||||
|
safe API to ensure interrupt entry is as fast and as simple as possible.
|
||||||
|
More information (albeit Cortex-M specific) is provided on the following
|
||||||
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
|
|
Loading…
Reference in a new issue