Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
48d2d0d1
authored
Jun 21, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base: changed note on spurios wakeups as per request
parent
b5182c16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
base_c/include/embb/base/c/condition_variable.h
+9
-9
base_cpp/include/embb/base/condition_variable.h
+9
-9
No files found.
base_c/include/embb/base/c/condition_variable.h
View file @
48d2d0d1
...
...
@@ -110,9 +110,9 @@ int embb_condition_notify_all(
* \threadsafe
* \see embb_condition_notify_one(), embb_condition_notify_all(),
* 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.
* \note
It is strongly recommended checking the condition in a loop in order
*
to deal with spurious wakeups and situations where another thread has
*
locked the mutex between notification and
wakeup.
*/
int
embb_condition_wait
(
embb_condition_t
*
condition_var
,
...
...
@@ -134,9 +134,9 @@ int embb_condition_wait(
* \threadsafe
* \see embb_condition_notify_one(), embb_condition_notify_all(),
* 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.
* \note
It is strongly recommended checking the condition in a loop in order
*
to deal with spurious wakeups and situations where another thread has
*
locked the mutex between notification and
wakeup.
*/
int
embb_condition_wait_until
(
embb_condition_t
*
condition_var
,
...
...
@@ -160,9 +160,9 @@ int embb_condition_wait_until(
* \threadsafe
* \see embb_condition_notify_one(), embb_condition_notify_all(),
* 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.
* \note
It is strongly recommended checking the condition in a loop in order
*
to deal with spurious wakeups and situations where another thread has
*
locked the mutex between notification and
wakeup.
*/
int
embb_condition_wait_for
(
embb_condition_t
*
condition_var
,
...
...
base_cpp/include/embb/base/condition_variable.h
View file @
48d2d0d1
...
...
@@ -100,9 +100,9 @@ class ConditionVariable {
*
* \see NotifyOne(), NotifyAll()
*
* \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.
* \note
It is strongly recommended checking the condition in a loop in order
*
to deal with spurious wakeups and situations where another thread has
*
locked the mutex between notification and
wakeup.
*/
void
Wait
(
UniqueLock
<
Mutex
>&
lock
...
...
@@ -123,9 +123,9 @@ class ConditionVariable {
*
* \threadsafe
*
* \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.
* \note
It is strongly recommended checking the condition in a loop in order
*
to deal with spurious wakeups and situations where another thread has
*
locked the mutex between notification and
wakeup.
*/
bool
WaitUntil
(
UniqueLock
<
Mutex
>&
lock
,
...
...
@@ -150,9 +150,9 @@ class ConditionVariable {
*
* \tparam Tick Type of tick of the duration. See Duration.
*
* \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.
* \note
It is strongly recommended checking the condition in a loop in order
*
to deal with spurious wakeups and situations where another thread has
*
locked the mutex between notification and
wakeup.
*/
template
<
typename
Tick
>
bool
WaitFor
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment