2

I have a lot of tasks in my application. Some tasks depend on others.

For example I have console task that prints outputs from all other "worker" tasks, so all these tasks before printing anything must wait until console task is fully initialized.

I have also more dependencies like this, with kind of dependency tree structure. For example task_modbus needs 3 tasks to be initialized: task_uart, task_filesystem, task_console.

What kind of synchronization object shall I use?

At this moment I'm using semaphores, one for each task dependency relation.

I was thinking about EventGroup, but maybe there is something more lightweight?

Kamil
  • 13,363
  • 24
  • 88
  • 183

1 Answers1

1

The xEventGroupSync() API seems most appropriate.

Richard
  • 3,081
  • 11
  • 9