Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
cffe6b28
Commit
cffe6b28
authored
Nov 18, 2009
by
Sebastian Eichelbaum
Browse files
[CHANGE] - made wait() const
parent
2458827e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
src/common/WCondition.cpp
src/common/WCondition.cpp
+1
-1
src/common/WCondition.h
src/common/WCondition.h
+3
-3
src/common/WConditionOneShot.cpp
src/common/WConditionOneShot.cpp
+1
-1
src/common/WConditionOneShot.h
src/common/WConditionOneShot.h
+1
-1
No files found.
src/common/WCondition.cpp
View file @
cffe6b28
...
...
@@ -34,7 +34,7 @@ WCondition::~WCondition()
// cleanup
}
void
WCondition
::
wait
()
void
WCondition
::
wait
()
const
{
m_condition
.
wait
(
m_mutex
);
}
...
...
src/common/WCondition.h
View file @
cffe6b28
...
...
@@ -49,7 +49,7 @@ public:
/**
* Wait for the condition. Sets the calling thread asleep.
*/
virtual
void
wait
();
virtual
void
wait
()
const
;
/**
* Notifies all waiting threads.
...
...
@@ -61,12 +61,12 @@ protected:
/**
* The condition.
*/
boost
::
condition_variable_any
m_condition
;
mutable
boost
::
condition_variable_any
m_condition
;
/**
* The mutex used for the condition.
*/
boost
::
shared_mutex
m_mutex
;
mutable
boost
::
shared_mutex
m_mutex
;
private:
};
...
...
src/common/WConditionOneShot.cpp
View file @
cffe6b28
...
...
@@ -44,7 +44,7 @@ WConditionOneShot::~WConditionOneShot()
}
}
void
WConditionOneShot
::
wait
()
void
WConditionOneShot
::
wait
()
const
{
// now we wait until the write lock is released and we can get a read lock
boost
::
shared_lock
<
boost
::
shared_mutex
>
slock
=
boost
::
shared_lock
<
boost
::
shared_mutex
>
(
m_mutex
);
...
...
src/common/WConditionOneShot.h
View file @
cffe6b28
...
...
@@ -54,7 +54,7 @@ public:
/**
* Wait for the condition. Sets the calling thread asleep.
*/
virtual
void
wait
();
virtual
void
wait
()
const
;
/**
* Notifies all waiting threads.
...
...
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