# How a task and a co-routine can communicate?

**URL:** <https://forums.freertos.org/t/how-a-task-and-a-co-routine-can-communicate/5494>\
**Category:** Kernel\
**Created:** [June 20, 2010, 4:09pm UTC](https://forums.freertos.org/t/how-a-task-and-a-co-routine-can-communicate/5494 "2010-06-20T16:09:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 20, 2010, 4:09pm UTC](https://forums.freertos.org/t/how-a-task-and-a-co-routine-can-communicate/5494/1 "2010-06-20T16:09:11Z")

</div>

**[amraldo](https://sourceforge.net/u/amraldo/)** wrote on [Sunday, June 20, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/f31bf1c0/#b5b7):

I was wondering. The tasks can communicate with themselves and with ISRs through queues. The same applies for co-routines.  
The question that popped into my mind, how a co-routine and a task can communicate?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 21, 2010, 7:53am UTC](https://forums.freertos.org/t/how-a-task-and-a-co-routine-can-communicate/5494/2 "2010-06-21T07:53:14Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Monday, June 21, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/f31bf1c0/#d5c0):

Read the first paragraph of [http://www.freertos.org/taskandcr.html](http://www.freertos.org/taskandcr.html)

There is nothing to stop you using shared memory to pass information between the two.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 21, 2010, 6:45pm UTC](https://forums.freertos.org/t/how-a-task-and-a-co-routine-can-communicate/5494/3 "2010-06-21T18:45:05Z")

</div>

**[amraldo](https://sourceforge.net/u/amraldo/)** wrote on [Monday, June 21, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/f31bf1c0/#9ea0):

In the header files of the co-routines, it says check the web page how a task can communicate with a co-routine.  
There is nothing like that in the web pages.  
By shared memory, you mean a global variable?  
What about synchronization if it was the case?
