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
b5182c16
authored
9 years ago
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base_cpp: added documentation for spurious wakeups with pthreads
parent
b2491a2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
base_cpp/include/embb/base/condition_variable.h
+12
-0
No files found.
base_cpp/include/embb/base/condition_variable.h
View file @
b5182c16
...
...
@@ -99,6 +99,10 @@ class ConditionVariable {
* \threadsafe
*
* \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.
*/
void
Wait
(
UniqueLock
<
Mutex
>&
lock
...
...
@@ -118,6 +122,10 @@ class ConditionVariable {
* \throws embb::base::ErrorException if an error occurred
*
* \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.
*/
bool
WaitUntil
(
UniqueLock
<
Mutex
>&
lock
,
...
...
@@ -141,6 +149,10 @@ class ConditionVariable {
* \threadsafe
*
* \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.
*/
template
<
typename
Tick
>
bool
WaitFor
(
...
...
This diff is collapsed.
Click to expand it.
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