[vlc-devel] commit: block_Fifo(Wake|Get|Show): always cancellation points ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Jan 6 11:22:06 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Jan 6 12:20:24 2009 +0200| [f34362c6c17c7d513f8971f84e11be906f1d0df6] | committer: Rémi Denis-Courmont
block_Fifo(Wake|Get|Show): always cancellation points
This is consistent with the comments in <vlc_block.h>.
So far, cancellation would only occur when sleeping was needed.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f34362c6c17c7d513f8971f84e11be906f1d0df6
---
src/misc/block.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/misc/block.c b/src/misc/block.c
index 1c68a3f..3cb5375 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -431,6 +431,8 @@ void block_FifoEmpty( block_fifo_t *p_fifo )
*/
void block_FifoPace (block_fifo_t *fifo, size_t max_depth, size_t max_size)
{
+ vlc_testcancel ();
+
vlc_mutex_lock (&fifo->lock);
while ((fifo->i_depth > max_depth) || (fifo->i_size > max_size))
{
@@ -483,6 +485,8 @@ block_t *block_FifoGet( block_fifo_t *p_fifo )
{
block_t *b;
+ vlc_testcancel( );
+
vlc_mutex_lock( &p_fifo->lock );
mutex_cleanup_push( &p_fifo->lock );
@@ -523,6 +527,8 @@ block_t *block_FifoShow( block_fifo_t *p_fifo )
{
block_t *b;
+ vlc_testcancel( );
+
vlc_mutex_lock( &p_fifo->lock );
mutex_cleanup_push( &p_fifo->lock );
More information about the vlc-devel
mailing list