# wait on condition function in FreeRTOS

**URL:** <https://forums.freertos.org/t/wait-on-condition-function-in-freertos/6588>\
**Category:** Kernel\
**Created:** [May 25, 2017, 4:16pm UTC](https://forums.freertos.org/t/wait-on-condition-function-in-freertos/6588 "2017-05-25T16:16:01Z")\
**Posts on this page:** 2\
**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 25, 2017, 4:16pm UTC](https://forums.freertos.org/t/wait-on-condition-function-in-freertos/6588/1 "2017-05-25T16:16:01Z")

</div>

**[ramzi-hm7](https://sourceforge.net/u/ramzi-hm7/)** wrote on [Thursday, May 25, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/57ca0c36/#178e):

Hello…  
is there someone who knows a method to implement a function in Freertos similar to pthread\_cond\_wait() in POSIX ? In fact, I have an application that creates and initializes a thread, the called thread takes the mutex, and the calling thread still blocked until the called thread’s initialisation achieved and returns a variable init = true, then the calling thread carry on the application execution… in linux, pthread\_cond\_wait() can do this, but i don’t find a similar API in freertos.

thanks

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [May 25, 2017, 5:06pm UTC](https://forums.freertos.org/t/wait-on-condition-function-in-freertos/6588/2 "2017-05-25T17:06:07Z")

</div>

**[hs2sf](https://sourceforge.net/u/hs2sf/)** wrote on [Thursday, May 25, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/57ca0c36/#feca):

I think you don’t really need a POSIX cond.var like mechanism to sync a thread start/init sequence.  
A simple binary semaphore (maybe incl. a shared variable carrying an error code) should be sufficient.
