Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
211199d8
Commit
211199d8
authored
Nov 16, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block_FifoEmpty: reduce contention scope
parent
eb461c0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
src/misc/block.c
src/misc/block.c
+15
-11
No files found.
src/misc/block.c
View file @
211199d8
...
...
@@ -508,23 +508,27 @@ void block_FifoRelease( block_fifo_t *p_fifo )
void
block_FifoEmpty
(
block_fifo_t
*
p_fifo
)
{
block_t
*
b
;
block_t
*
b
lock
;
vlc_mutex_lock
(
&
p_fifo
->
lock
);
for
(
b
=
p_fifo
->
p_first
;
b
!=
NULL
;
)
block
=
p_fifo
->
p_first
;
if
(
block
!=
NULL
)
{
block_t
*
p_next
;
p_next
=
b
->
p_next
;
block_Release
(
b
);
b
=
p_next
;
p_fifo
->
i_depth
=
p_fifo
->
i_size
=
0
;
p_fifo
->
p_first
=
NULL
;
p_fifo
->
pp_last
=
&
p_fifo
->
p_first
;
}
p_fifo
->
i_depth
=
p_fifo
->
i_size
=
0
;
p_fifo
->
p_first
=
NULL
;
p_fifo
->
pp_last
=
&
p_fifo
->
p_first
;
vlc_cond_broadcast
(
&
p_fifo
->
wait_room
);
vlc_mutex_unlock
(
&
p_fifo
->
lock
);
while
(
block
!=
NULL
)
{
block_t
*
buf
;
buf
=
block
->
p_next
;
block_Release
(
block
);
block
=
buf
;
}
}
/**
...
...
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