[vlc-commits] block: remove block_FifoWake()

Rémi Denis-Courmont git at videolan.org
Thu Mar 19 18:56:15 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 17 20:07:48 2015 +0200| [3188896364d878b5f7183e6bea4dd712e10a0531] | committer: Rémi Denis-Courmont

block: remove block_FifoWake()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3188896364d878b5f7183e6bea4dd712e10a0531
---

 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 7e2c656..6fcf5f2 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 943c570..555f1db 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 10749e9..dd97a19 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);
 



More information about the vlc-commits mailing list