Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
1bca29f9
Commit
1bca29f9
authored
Jun 23, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Control: rename "cond" to "wake_cond"
Prepare for adding another Cond attribute.
parent
efb8a9bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Control.cxx
src/output/Control.cxx
+3
-3
Control.hxx
src/output/Control.hxx
+1
-1
Thread.cxx
src/output/Thread.cxx
+2
-2
No files found.
src/output/Control.cxx
View file @
1bca29f9
...
...
@@ -128,7 +128,7 @@ AudioOutputControl::CommandAsync(Command cmd) noexcept
assert
(
IsCommandFinished
());
command
=
cmd
;
cond
.
signal
();
wake_
cond
.
signal
();
}
void
...
...
@@ -298,7 +298,7 @@ AudioOutputControl::LockPlay() noexcept
if
(
IsOpen
()
&&
!
in_playback_loop
&&
!
woken_for_play
)
{
woken_for_play
=
true
;
cond
.
signal
();
wake_
cond
.
signal
();
}
}
...
...
@@ -346,7 +346,7 @@ AudioOutputControl::LockAllowPlay() noexcept
allow_play
=
true
;
if
(
IsOpen
())
cond
.
signal
();
wake_
cond
.
signal
();
}
void
...
...
src/output/Control.hxx
View file @
1bca29f9
...
...
@@ -91,7 +91,7 @@ class AudioOutputControl {
* This condition object wakes up the output thread after
* #command has been set.
*/
Cond
cond
;
Cond
wake_
cond
;
/**
* Additional data for #command. Protected by #mutex.
...
...
src/output/Thread.cxx
View file @
1bca29f9
...
...
@@ -218,7 +218,7 @@ AudioOutputControl::WaitForDelay() noexcept
if
(
delay
<=
std
::
chrono
::
steady_clock
::
duration
::
zero
())
return
true
;
(
void
)
cond
.
timed_wait
(
mutex
,
delay
);
(
void
)
wake_
cond
.
timed_wait
(
mutex
,
delay
);
if
(
command
!=
Command
::
NONE
)
return
false
;
...
...
@@ -491,7 +491,7 @@ AudioOutputControl::Task() noexcept
if
(
command
==
Command
::
NONE
)
{
woken_for_play
=
false
;
cond
.
wait
(
mutex
);
wake_
cond
.
wait
(
mutex
);
}
}
}
...
...
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