wella wrote on Monday, August 24, 2009:
Hello,
how is the simplest implementation of barrier in FreeRTOS? I mean situation when a task is waiting for two or more events to continue. Having two or more semaphores/mutexes is not memory effective(some post notes that for one semaphore a 100 byte is requested).
I think that vSemaphoreCreateCounting() cannot be used for this purpose because a task is waken if the value is != 0.
Thank you for your advice.
P.S.
If it is not possible I would suggest this feature.
xSemaphoreCreateBarrier( unsigned portBASE_TYPE uxMaxCount, unsigned portBASE_TYPE uxInitialCount). If a this type of semaphore is taken, the task will wait until uxInitialCount == uxMaxCount.