Commit b2491a2e by Marcus Winter

base_c: added documentation for spurious wakeups with pthreads

parent 04ead31a
...@@ -110,6 +110,9 @@ int embb_condition_notify_all( ...@@ -110,6 +110,9 @@ int embb_condition_notify_all(
* \threadsafe * \threadsafe
* \see embb_condition_notify_one(), embb_condition_notify_all(), * \see embb_condition_notify_one(), embb_condition_notify_all(),
* embb_condition_wait_until(), embb_condition_wait_for() * embb_condition_wait_until(), embb_condition_wait_for()
* \note When pthreads is used as the underlying library, this function may issue
* spurious wake ups to a waiting thread. Therefore it is recommended to
* use a loop checking the condition after a wakeup.
*/ */
int embb_condition_wait( int embb_condition_wait(
embb_condition_t* condition_var, embb_condition_t* condition_var,
...@@ -131,6 +134,9 @@ int embb_condition_wait( ...@@ -131,6 +134,9 @@ int embb_condition_wait(
* \threadsafe * \threadsafe
* \see embb_condition_notify_one(), embb_condition_notify_all(), * \see embb_condition_notify_one(), embb_condition_notify_all(),
* embb_condition_wait(), embb_condition_wait_for() * embb_condition_wait(), embb_condition_wait_for()
* \note When pthreads is used as the underlying library, this function may issue
* spurious wake ups to a waiting thread. Therefore it is recommended to
* use a loop checking the condition after a wakeup.
*/ */
int embb_condition_wait_until( int embb_condition_wait_until(
embb_condition_t* condition_var, embb_condition_t* condition_var,
...@@ -154,6 +160,9 @@ int embb_condition_wait_until( ...@@ -154,6 +160,9 @@ int embb_condition_wait_until(
* \threadsafe * \threadsafe
* \see embb_condition_notify_one(), embb_condition_notify_all(), * \see embb_condition_notify_one(), embb_condition_notify_all(),
* embb_condition_wait(), embb_condition_wait_until() * embb_condition_wait(), embb_condition_wait_until()
* \note When pthreads is used as the underlying library, this function may issue
* spurious wake ups to a waiting thread. Therefore it is recommended to
* use a loop checking the condition after a wakeup.
*/ */
int embb_condition_wait_for( int embb_condition_wait_for(
embb_condition_t* condition_var, embb_condition_t* condition_var,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment