From 47167d0dce603161f9ec629d0eae178c368a57b1 Mon Sep 17 00:00:00 2001 From: Ewald Snel Date: Mon, 3 Mar 2003 07:37:23 +0000 Subject: Remove pthread_cancel() support, these threads are never pthread_cancelled - only some input plugins (still) have this... old code from xine 0.9.x? CVS patchset: 4325 CVS date: 2003/03/03 07:37:23 --- src/xine-engine/buffer.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index 38aaa0ec6..af2f08242 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.c,v 1.25 2003/02/23 19:27:57 tmattern Exp $ + * $Id: buffer.c,v 1.26 2003/03/03 07:37:23 esnel Exp $ * * * contents: @@ -60,21 +60,6 @@ static void buffer_pool_free (buf_element_t *element) { pthread_mutex_unlock (&this->buffer_pool_mutex); } -/* - * helper function to release buffer pool lock - * in case demux thread is cancelled - */ - -void pool_release_lock (void *arg) { - - pthread_mutex_t *mutex = (pthread_mutex_t *) arg; - - /* printf ("pool release lock\n"); */ - - pthread_mutex_unlock (mutex); - -} - /* * allocate a buffer from buffer pool */ @@ -83,10 +68,6 @@ static buf_element_t *buffer_pool_alloc (fifo_buffer_t *this) { buf_element_t *buf; - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); - - pthread_cleanup_push( pool_release_lock, &this->buffer_pool_mutex); - pthread_mutex_lock (&this->buffer_pool_mutex); /* we always keep one free buffer for emergency situations like @@ -99,14 +80,8 @@ static buf_element_t *buffer_pool_alloc (fifo_buffer_t *this) { this->buffer_pool_top = this->buffer_pool_top->next; this->buffer_pool_num_free--; - pthread_cleanup_pop (0); - pthread_mutex_unlock (&this->buffer_pool_mutex); - /* needed because cancellation points defined by POSIX - (eg. 'read') would leak allocated buffers */ - pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); - /* set sane values to the newly allocated buffer */ buf->content = buf->mem; /* 99% of demuxers will want this */ buf->pts = 0; -- cgit v1.2.3