Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
888f4987
Commit
888f4987
authored
Jan 12, 2011
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: use of vlc_mutex_locker simplifies things a bit
pointed out by courmish
parent
2c45bce6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
modules/gui/skins2/commands/cmd_callbacks.hpp
modules/gui/skins2/commands/cmd_callbacks.hpp
+2
-7
No files found.
modules/gui/skins2/commands/cmd_callbacks.hpp
View file @
888f4987
...
...
@@ -91,12 +91,11 @@ public:
static
void
executeWait
(
const
CmdGenericPtr
&
rcCommand
)
{
CmdExecuteBlock
&
rCmd
=
(
CmdExecuteBlock
&
)
*
rcCommand
.
get
();
vlc_mutex_lock
(
&
rCmd
.
m_lock
);
vlc_mutex_lock
er
locker
(
&
rCmd
.
m_lock
);
if
(
!
rCmd
.
m_pObj
||
!
rCmd
.
m_pfFunc
||
rCmd
.
m_executing
)
{
msg_Err
(
rCmd
.
getIntf
(),
"unexpected command call"
);
vlc_mutex_unlock
(
&
rCmd
.
m_lock
);
return
;
}
...
...
@@ -106,25 +105,21 @@ public:
rCmd
.
m_executing
=
true
;
while
(
rCmd
.
m_executing
)
vlc_cond_wait
(
&
rCmd
.
m_wait
,
&
rCmd
.
m_lock
);
vlc_mutex_unlock
(
&
rCmd
.
m_lock
);
}
virtual
void
execute
()
{
vlc_mutex_lock
(
&
m_lock
);
vlc_mutex_lock
er
locker
(
&
m_lock
);
if
(
!
m_pObj
||
!
m_pfFunc
||
!
m_executing
)
{
msg_Err
(
getIntf
(),
"unexpected command call"
);
vlc_mutex_unlock
(
&
m_lock
);
return
;
}
(
*
m_pfFunc
)(
getIntf
(),
m_pObj
);
m_executing
=
false
;
vlc_cond_signal
(
&
m_wait
);
vlc_mutex_unlock
(
&
m_lock
);
}
virtual
string
getType
()
const
{
return
"CmdExecuteBlock"
;
}
...
...
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