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
2a8b955a
Commit
2a8b955a
authored
Dec 05, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block: add vlc_fifo_TimedWaitCond
parent
8c4fff2f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
include/vlc_block.h
include/vlc_block.h
+1
-0
src/misc/fifo.c
src/misc/fifo.c
+9
-0
No files found.
include/vlc_block.h
View file @
2a8b955a
...
...
@@ -326,6 +326,7 @@ VLC_API void vlc_fifo_Unlock(vlc_fifo_t *);
VLC_API
void
vlc_fifo_Signal
(
vlc_fifo_t
*
);
VLC_API
void
vlc_fifo_Wait
(
vlc_fifo_t
*
);
VLC_API
void
vlc_fifo_WaitCond
(
vlc_fifo_t
*
,
vlc_cond_t
*
);
int
vlc_fifo_TimedWaitCond
(
vlc_fifo_t
*
,
vlc_cond_t
*
,
mtime_t
);
VLC_API
void
vlc_fifo_QueueUnlocked
(
vlc_fifo_t
*
,
block_t
*
);
VLC_API
block_t
*
vlc_fifo_DequeueUnlocked
(
vlc_fifo_t
*
)
VLC_USED
;
VLC_API
block_t
*
vlc_fifo_DequeueAllUnlocked
(
vlc_fifo_t
*
)
VLC_USED
;
...
...
src/misc/fifo.c
View file @
2a8b955a
...
...
@@ -110,6 +110,15 @@ void vlc_fifo_WaitCond(vlc_fifo_t *fifo, vlc_cond_t *condvar)
vlc_cond_wait
(
condvar
,
&
fifo
->
lock
);
}
/**
* Atomically unlocks the FIFO and waits until one thread signals the FIFO up
* to a certain date, then locks the FIFO again. See vlc_fifo_Wait().
*/
int
vlc_fifo_TimedWaitCond
(
vlc_fifo_t
*
fifo
,
vlc_cond_t
*
condvar
,
mtime_t
deadline
)
{
return
vlc_cond_timedwait
(
condvar
,
&
fifo
->
lock
,
deadline
);
}
/**
* Checks how many blocks are queued in a locked FIFO.
*
...
...
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