# Multi-Task to Multi-Task event ...

**URL:** <https://forums.freertos.org/t/multi-task-to-multi-task-event/4734>\
**Category:** Kernel\
**Created:** [May 1, 2014, 9:24am UTC](https://forums.freertos.org/t/multi-task-to-multi-task-event/4734 "2014-05-01T09:24:44Z")\
**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:** [May 1, 2014, 9:24am UTC](https://forums.freertos.org/t/multi-task-to-multi-task-event/4734/1 "2014-05-01T09:24:44Z")

</div>

**[debugasm](https://sourceforge.net/u/debugasm/)** wrote on [Thursday, May 01, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/d31f741a/#9776):

Hi,

I need a little input on how to accomplish this. My project is structured as follows :

Input A - Thread Input A -----+  
Input B - Thread Input B -----+  
Input C - Thread Input C -----±---- Thread Output A - Output A  
Input D - Thread Input D -----±---- Thread Output B - Output B  
Input E - Thread Input E -----±---- Thread Output C - Output C  
Input F - Thread Input F -----±---- Thread Output D - Output D  
Input G - Thread Input G -----+  
Input H - Thread Input H -----+

Thread Input X running the same code on different input.  
Thread Output X running the same code on different output.

I have to be able to send from one Thread Input X an event / message or another  
to all Thread Output X (also not in the same instant).

In my first approach I used a message queue. In Thread Output X I have create 4  
message queue on which the Thread Input X write (Thread Output X only read).

On event in Thread Input X I write the same message on all 4 message queue, but  
it does not seem like the ideal solution.

What technique can I use ? Event Group ?

Thanks for any suggestions.

debugasm

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 1, 2014, 9:46am UTC](https://forums.freertos.org/t/multi-task-to-multi-task-event/4734/2 "2014-05-01T09:46:47Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Thursday, May 01, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/d31f741a/#da75):

How detailed is the event? If it can be conveyed as a single bit then an event group would let all the tasks block on the same bits in the same event group with each bit having a different meaning.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 1, 2014, 10:00am UTC](https://forums.freertos.org/t/multi-task-to-multi-task-event/4734/3 "2014-05-01T10:00:14Z")

</div>

**[debugasm](https://sourceforge.net/u/debugasm/)** wrote on [Thursday, May 01, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/d31f741a/#8ea0):

> How detailed is the event?

Yes, a single bit is sufficient.

Then with an EventGroup of 4-bit size I should be able to simplify things.

I create one EventGroup with 4-bit size, each Thread Input X writes the corresponding bit to wake up Thread Output X. On Thread Output X waiting an EventGroup on single bit.

It should go, I try.

Thanks very much.

debugasm
