Commit 48d2d0d1 by Marcus Winter

base: changed note on spurios wakeups as per request

parent b5182c16
...@@ -110,9 +110,9 @@ int embb_condition_notify_all( ...@@ -110,9 +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 * \note It is strongly recommended checking the condition in a loop in order
* spurious wake ups to a waiting thread. Therefore it is recommended to * to deal with spurious wakeups and situations where another thread has
* use a loop checking the condition after a wakeup. * locked the mutex between notification and wakeup.
*/ */
int embb_condition_wait( int embb_condition_wait(
embb_condition_t* condition_var, embb_condition_t* condition_var,
...@@ -134,9 +134,9 @@ int embb_condition_wait( ...@@ -134,9 +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 * \note It is strongly recommended checking the condition in a loop in order
* spurious wake ups to a waiting thread. Therefore it is recommended to * to deal with spurious wakeups and situations where another thread has
* use a loop checking the condition after a wakeup. * locked the mutex between notification and wakeup.
*/ */
int embb_condition_wait_until( int embb_condition_wait_until(
embb_condition_t* condition_var, embb_condition_t* condition_var,
...@@ -160,9 +160,9 @@ int embb_condition_wait_until( ...@@ -160,9 +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 * \note It is strongly recommended checking the condition in a loop in order
* spurious wake ups to a waiting thread. Therefore it is recommended to * to deal with spurious wakeups and situations where another thread has
* use a loop checking the condition after a wakeup. * locked the mutex between notification and wakeup.
*/ */
int embb_condition_wait_for( int embb_condition_wait_for(
embb_condition_t* condition_var, embb_condition_t* condition_var,
......
...@@ -100,9 +100,9 @@ class ConditionVariable { ...@@ -100,9 +100,9 @@ class ConditionVariable {
* *
* \see NotifyOne(), NotifyAll() * \see NotifyOne(), NotifyAll()
* *
* \note When Pthreads is used as the underlying library, this function may issue * \note It is strongly recommended checking the condition in a loop in order
* spurious wake ups to a waiting thread. Therefore it is recommended to * to deal with spurious wakeups and situations where another thread has
* use a loop checking the condition after a wakeup. * locked the mutex between notification and wakeup.
*/ */
void Wait( void Wait(
UniqueLock<Mutex>& lock UniqueLock<Mutex>& lock
...@@ -123,9 +123,9 @@ class ConditionVariable { ...@@ -123,9 +123,9 @@ class ConditionVariable {
* *
* \threadsafe * \threadsafe
* *
* \note When Pthreads is used as the underlying library, this function may issue * \note It is strongly recommended checking the condition in a loop in order
* spurious wake ups to a waiting thread. Therefore it is recommended to * to deal with spurious wakeups and situations where another thread has
* use a loop checking the condition after a wakeup. * locked the mutex between notification and wakeup.
*/ */
bool WaitUntil( bool WaitUntil(
UniqueLock<Mutex>& lock, UniqueLock<Mutex>& lock,
...@@ -150,9 +150,9 @@ class ConditionVariable { ...@@ -150,9 +150,9 @@ class ConditionVariable {
* *
* \tparam Tick Type of tick of the duration. See Duration. * \tparam Tick Type of tick of the duration. See Duration.
* *
* \note When Pthreads is used as the underlying library, this function may issue * \note It is strongly recommended checking the condition in a loop in order
* spurious wake ups to a waiting thread. Therefore it is recommended to * to deal with spurious wakeups and situations where another thread has
* use a loop checking the condition after a wakeup. * locked the mutex between notification and wakeup.
*/ */
template<typename Tick> template<typename Tick>
bool WaitFor( bool WaitFor(
......
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