Refine comments related to taskYIELD in queue.h (#1333)
Some checks failed
CI Checks / formatting (push) Has been cancelled
CI Checks / spell-check (push) Has been cancelled
CI Checks / link-verifier (push) Has been cancelled
CI Checks / verify-manifest (push) Has been cancelled
Coverity Scan / Coverity Scan (push) Has been cancelled
git-secrets Check / git-secrets (push) Has been cancelled
Kernel-Checker / FreeRTOS Kernel Header Checks (push) Has been cancelled
FreeRTOS-Kernel Demos / WIN32 MSVC (push) Has been cancelled
FreeRTOS-Kernel Demos / WIN32 MingW (push) Has been cancelled
FreeRTOS-Kernel Demos / Native GCC (macos-latest) (push) Has been cancelled
FreeRTOS-Kernel Demos / Native GCC (ubuntu-latest) (push) Has been cancelled
FreeRTOS-Kernel Demos / CMake Example with Native GCC (push) Has been cancelled
FreeRTOS-Kernel Demos / GNU MSP430 Toolchain (push) Has been cancelled
FreeRTOS-Kernel Demos / GCC MicroBlaze Toolchain (push) Has been cancelled
FreeRTOS-Kernel Demos / GNU ARM Toolchain (push) Has been cancelled
CMock Unit Tests / run (push) Has been cancelled
Some checks failed
CI Checks / formatting (push) Has been cancelled
CI Checks / spell-check (push) Has been cancelled
CI Checks / link-verifier (push) Has been cancelled
CI Checks / verify-manifest (push) Has been cancelled
Coverity Scan / Coverity Scan (push) Has been cancelled
git-secrets Check / git-secrets (push) Has been cancelled
Kernel-Checker / FreeRTOS Kernel Header Checks (push) Has been cancelled
FreeRTOS-Kernel Demos / WIN32 MSVC (push) Has been cancelled
FreeRTOS-Kernel Demos / WIN32 MingW (push) Has been cancelled
FreeRTOS-Kernel Demos / Native GCC (macos-latest) (push) Has been cancelled
FreeRTOS-Kernel Demos / Native GCC (ubuntu-latest) (push) Has been cancelled
FreeRTOS-Kernel Demos / CMake Example with Native GCC (push) Has been cancelled
FreeRTOS-Kernel Demos / GNU MSP430 Toolchain (push) Has been cancelled
FreeRTOS-Kernel Demos / GCC MicroBlaze Toolchain (push) Has been cancelled
FreeRTOS-Kernel Demos / GNU ARM Toolchain (push) Has been cancelled
CMock Unit Tests / run (push) Has been cancelled
Replace taskYIELD with portYIELD_FROM_ISR Signed-off-by: wangfei_chen <wangfei_chen@realsil.com.cn> Co-authored-by: wangfei_chen <wangfei_chen@realsil.com.cn>
This commit is contained in:
@@ -1026,7 +1026,11 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
|
||||
* // Now the buffer is empty we can switch context if necessary.
|
||||
* if( xHigherPriorityTaskWoken )
|
||||
* {
|
||||
* taskYIELD ();
|
||||
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
|
||||
* // switch should be requested. The macro used is port specific and
|
||||
* // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
|
||||
* // refer to the documentation page for the port being used.
|
||||
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
* }
|
||||
* }
|
||||
* @endcode
|
||||
@@ -1098,7 +1102,11 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
|
||||
* // Now the buffer is empty we can switch context if necessary.
|
||||
* if( xHigherPriorityTaskWoken )
|
||||
* {
|
||||
* taskYIELD ();
|
||||
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
|
||||
* // switch should be requested. The macro used is port specific and
|
||||
* // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
|
||||
* // refer to the documentation page for the port being used.
|
||||
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
* }
|
||||
* }
|
||||
* @endcode
|
||||
@@ -1429,23 +1437,27 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||
* // ISR that outputs all the characters received on the queue.
|
||||
* void vISR_Routine( void )
|
||||
* {
|
||||
* BaseType_t xTaskWokenByReceive = pdFALSE;
|
||||
* BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
* char cRxedChar;
|
||||
*
|
||||
* while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &xTaskWokenByReceive) )
|
||||
* while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &xHigherPriorityTaskWoken) )
|
||||
* {
|
||||
* // A character was received. Output the character now.
|
||||
* vOutputCharacter( cRxedChar );
|
||||
*
|
||||
* // If removing the character from the queue woke the task that was
|
||||
* // posting onto the queue xTaskWokenByReceive will have been set to
|
||||
* // posting onto the queue xHigherPriorityTaskWoken will have been set to
|
||||
* // pdTRUE. No matter how many times this loop iterates only one
|
||||
* // task will be woken.
|
||||
* }
|
||||
*
|
||||
* if( xTaskWokenByReceive != ( char ) pdFALSE;
|
||||
* if( xHigherPrioritytaskWoken == pdTRUE );
|
||||
* {
|
||||
* taskYIELD ();
|
||||
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
|
||||
* // switch should be requested. The macro used is port specific and
|
||||
* // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
|
||||
* // refer to the documentation page for the port being used.
|
||||
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
* }
|
||||
* }
|
||||
* @endcode
|
||||
|
||||
Reference in New Issue
Block a user