void *pxReturn;\r
\r
/* This function is called by xSemaphoreGetMutexHolder(), and should not\r
- be called directly. Note: This is is a good way of determining if the\r
+ be called directly. Note: This is a good way of determining if the\r
calling task is the mutex holder, but not a good way of determining the\r
identity of the mutex holder, as the holder may change between the\r
following critical section exiting and the function returning. */\r
configASSERT( pxQueue );\r
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );\r
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );\r
+ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )\r
+ {\r
+ configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );\r
+ }\r
+ #endif\r
+\r
\r
/* This function relaxes the coding standard somewhat to allow return\r
statements within the function itself. This is done in the interest\r
{\r
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )\r
{\r
- portENTER_CRITICAL();\r
+ taskENTER_CRITICAL();\r
{\r
vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder );\r
}\r
- portEXIT_CRITICAL();\r
+ taskEXIT_CRITICAL();\r
}\r
}\r
#endif\r
\r
/* RTOS ports that support interrupt nesting have the concept of a maximum\r
system call (or maximum API call) interrupt priority. Interrupts that are\r
- above the maximum system call priority are keep permanently enabled, even\r
+ above the maximum system call priority are kept permanently enabled, even\r
when the RTOS kernel is in a critical section, but cannot make any calls to\r
FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h\r
then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion\r
\r
configASSERT( pxQueue );\r
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );\r
-\r
+ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )\r
+ {\r
+ configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );\r
+ }\r
+ #endif\r
+ \r
/* This function relaxes the coding standard somewhat to allow return\r
statements within the function itself. This is done in the interest\r
of execution time efficiency. */\r
{\r
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )\r
{\r
- portENTER_CRITICAL();\r
+ taskENTER_CRITICAL();\r
{\r
vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder );\r
}\r
- portEXIT_CRITICAL();\r
+ taskEXIT_CRITICAL();\r
}\r
}\r
#endif\r
\r
/* RTOS ports that support interrupt nesting have the concept of a maximum\r
system call (or maximum API call) interrupt priority. Interrupts that are\r
- above the maximum system call priority are keep permanently enabled, even\r
+ above the maximum system call priority are kept permanently enabled, even\r
when the RTOS kernel is in a critical section, but cannot make any calls to\r
FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h\r
then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion\r
\r
/* RTOS ports that support interrupt nesting have the concept of a maximum\r
system call (or maximum API call) interrupt priority. Interrupts that are\r
- above the maximum system call priority are keep permanently enabled, even\r
+ above the maximum system call priority are kept permanently enabled, even\r
when the RTOS kernel is in a critical section, but cannot make any calls to\r
FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h\r
then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion\r