Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Cannot xQueueSend then crQUEUE_RECEIVE

Posted by Michael Carr on September 8, 2007
I just posted a bug that I couldn't add to a queue in a Task using xQueueSend and then retrieve from the queue in a coroutine using crQUEUE_RECEIVE. The reply to the bug was "This is not a bug. Unfortunately, tasks and co-routines cannot share a
queue or semaphore." If this is the case, I think the documentation should be modified to reflect this restriction, perhaps referring to "Task Queue" and "Coroutine Queue". Currently the documentation doesn't differentiate between Queue types.

RE: Cannot xQueueSend then crQUEUE_RECEIVE

Posted by Richard on September 8, 2007
I have to agree that the documentation was not as clear on this matter as it could be. I have added:

"Note that co-routines can only send data to other co-routines. A co-routine cannot use a queue to send data to a task or visa versa"

to the crSEND and crRECEIVE pages, and:

" Note that an application can be designed using just tasks, just co-routines, or a mixture of both - however tasks and co-routines use different API functions and therefore a queue (or semaphore) cannot be used to pass data from a task to a co-routine or visa versa."

to the page describing the differences between tasks and co-routines.

Regards.

RE: Cannot xQueueSend then crQUEUE_RECEIVE

Posted by Michael Carr on September 8, 2007
Thank you, that clarifies the issue and will be helpful to others.

RE: Cannot xQueueSend then crQUEUE_RECEIVE

Posted by sashiono on September 12, 2007
I feel that it greatly reduces the functionality of co-routines that you cannot passed data between queues from a co-routine to a task. What causes it limitation and it there a way to connect the queues between the two?


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS