From 3188896364d878b5f7183e6bea4dd712e10a0531 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 17 Mar 2015 20:07:48 +0200 Subject: [PATCH] block: remove block_FifoWake() --- include/vlc_block.h | 1 - src/libvlccore.sym | 1 - src/misc/fifo.c | 14 +------------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/vlc_block.h b/include/vlc_block.h index 7e2c656988..6fcf5f264a 100644 --- a/include/vlc_block.h +++ b/include/vlc_block.h @@ -314,7 +314,6 @@ VLC_API void block_FifoRelease( block_fifo_t * ); VLC_API void block_FifoPace( block_fifo_t *fifo, size_t max_depth, size_t max_size ); VLC_API void block_FifoEmpty( block_fifo_t * ); VLC_API void block_FifoPut( block_fifo_t *, block_t * ); -VLC_API void block_FifoWake( block_fifo_t * ); VLC_API block_t * block_FifoGet( block_fifo_t * ) VLC_USED; VLC_API block_t * block_FifoShow( block_fifo_t * ); size_t block_FifoSize(block_fifo_t *) VLC_USED; diff --git a/src/libvlccore.sym b/src/libvlccore.sym index 943c570eb2..555f1dbe5d 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -31,7 +31,6 @@ block_FifoPace block_FifoPut block_FifoRelease block_FifoShow -block_FifoWake block_File block_FilePath block_heap_Alloc diff --git a/src/misc/fifo.c b/src/misc/fifo.c index 10749e9a5c..dd97a19815 100644 --- a/src/misc/fifo.c +++ b/src/misc/fifo.c @@ -49,7 +49,6 @@ struct block_fifo_t block_t **pp_last; size_t i_depth; size_t i_size; - bool b_force_wake; }; /** @@ -258,7 +257,6 @@ block_fifo_t *block_FifoNew( void ) p_fifo->p_first = NULL; p_fifo->pp_last = &p_fifo->p_first; p_fifo->i_depth = p_fifo->i_size = 0; - p_fifo->b_force_wake = false; return p_fifo; } @@ -332,15 +330,6 @@ void block_FifoPut(block_fifo_t *fifo, block_t *block) vlc_fifo_Unlock(fifo); } -void block_FifoWake( block_fifo_t *p_fifo ) -{ - vlc_mutex_lock( &p_fifo->lock ); - if( p_fifo->p_first == NULL ) - p_fifo->b_force_wake = true; - vlc_cond_broadcast( &p_fifo->wait ); - vlc_mutex_unlock( &p_fifo->lock ); -} - /** * Dequeue the first block from the FIFO. If necessary, wait until there is * one block in the queue. This function is (always) cancellation point. @@ -354,13 +343,12 @@ block_t *block_FifoGet(block_fifo_t *fifo) vlc_testcancel(); vlc_fifo_Lock(fifo); - while (vlc_fifo_IsEmpty(fifo) && !fifo->b_force_wake) + while (vlc_fifo_IsEmpty(fifo)) { vlc_fifo_CleanupPush(fifo); vlc_fifo_Wait(fifo); vlc_cleanup_pop(); } - fifo->b_force_wake = false; block = vlc_fifo_DequeueUnlocked(fifo); vlc_fifo_Unlock(fifo); -- 2.39.5