diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2003-03-03 07:37:23 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2003-03-03 07:37:23 +0000 |
commit | 47167d0dce603161f9ec629d0eae178c368a57b1 (patch) | |
tree | 621e5f16937a25fd477fd5bdbe50d0319fb6863e /src/xine-engine/buffer.c | |
parent | 48be62b54906bd6cae986a906baa9676cac3525a (diff) | |
download | xine-lib-47167d0dce603161f9ec629d0eae178c368a57b1.tar.gz xine-lib-47167d0dce603161f9ec629d0eae178c368a57b1.tar.bz2 |
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
Diffstat (limited to 'src/xine-engine/buffer.c')
-rw-r--r-- | src/xine-engine/buffer.c | 27 |
1 files changed, 1 insertions, 26 deletions
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: @@ -61,21 +61,6 @@ static void buffer_pool_free (buf_element_t *element) { } /* - * 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; |