MCPcopy Create free account
hub / github.com/FreeRTOS/FreeRTOS-Kernel / xQueueCRSendFromISR

Function xQueueCRSendFromISR

queue.c:2611–2654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2609#if ( configUSE_CO_ROUTINES == 1 )
2610
2611 BaseType_t xQueueCRSendFromISR( QueueHandle_t xQueue,
2612 const void * pvItemToQueue,
2613 BaseType_t xCoRoutinePreviouslyWoken )
2614 {
2615 Queue_t * const pxQueue = xQueue;
2616
2617 /* Cannot block within an ISR so if there is no space on the queue then
2618 * exit without doing anything. */
2619 if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )
2620 {
2621 prvCopyDataToQueue( pxQueue, pvItemToQueue, queueSEND_TO_BACK );
2622
2623 /* We only want to wake one co-routine per ISR, so check that a
2624 * co-routine has not already been woken. */
2625 if( xCoRoutinePreviouslyWoken == pdFALSE )
2626 {
2627 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
2628 {
2629 if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
2630 {
2631 return pdTRUE;
2632 }
2633 else
2634 {
2635 mtCOVERAGE_TEST_MARKER();
2636 }
2637 }
2638 else
2639 {
2640 mtCOVERAGE_TEST_MARKER();
2641 }
2642 }
2643 else
2644 {
2645 mtCOVERAGE_TEST_MARKER();
2646 }
2647 }
2648 else
2649 {
2650 mtCOVERAGE_TEST_MARKER();
2651 }
2652
2653 return xCoRoutinePreviouslyWoken;
2654 }
2655
2656#endif /* configUSE_CO_ROUTINES */
2657/*-----------------------------------------------------------*/

Callers

nothing calls this directly

Calls 2

prvCopyDataToQueueFunction · 0.85

Tested by

no test coverage detected