Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
15ce6c62
Commit
15ce6c62
authored
Dec 30, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block: add locking to block_FifoCount/block_FifoSize
parent
a606130b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
src/misc/block.c
src/misc/block.c
+10
-4
No files found.
src/misc/block.c
View file @
15ce6c62
...
@@ -548,14 +548,20 @@ block_t *block_FifoShow( block_fifo_t *p_fifo )
...
@@ -548,14 +548,20 @@ block_t *block_FifoShow( block_fifo_t *p_fifo )
return
b
;
return
b
;
}
}
/* FIXME: not thread-safe */
size_t
block_FifoSize
(
const
block_fifo_t
*
p_fifo
)
size_t
block_FifoSize
(
const
block_fifo_t
*
p_fifo
)
{
{
return
p_fifo
->
i_size
;
size_t
i_size
;
vlc_mutex_lock
(
&
p_fifo
->
lock
);
i_size
=
p_fifo
->
i_size
;
vlc_mutex_unlock
(
&
p_fifo
->
lock
);
return
i_size
;
}
}
/* FIXME: not thread-safe */
size_t
block_FifoCount
(
const
block_fifo_t
*
p_fifo
)
size_t
block_FifoCount
(
const
block_fifo_t
*
p_fifo
)
{
{
return
p_fifo
->
i_depth
;
size_t
i_depth
;
vlc_mutex_lock
(
&
p_fifo
->
lock
);
i_depth
=
p_fifo
->
i_depth
;
vlc_mutex_unlock
(
&
p_fifo
->
lock
);
return
i_depth
;
}
}
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