diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-03-18 00:55:31 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-03-18 00:55:31 +0000 |
commit | 9a0b055e96c2f68b46787a17cb3c314f6cefc95d (patch) | |
tree | 917f18d962ae7c4dee0aab36c11347bd294ab40d /src/xine-engine/xine.c | |
parent | cdec7f82959eb05d1c3e4632af9d1e54bcc4c3bb (diff) | |
parent | 431033df2571df5bdd1ec1253cf04921b6d01368 (diff) | |
download | xine-lib-9a0b055e96c2f68b46787a17cb3c314f6cefc95d.tar.gz xine-lib-9a0b055e96c2f68b46787a17cb3c314f6cefc95d.tar.bz2 |
Merge from 1.1.
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r-- | src/xine-engine/xine.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index ce0adf4de..5c8d0be9d 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -139,7 +139,7 @@ static int acquire_allowed_to_block(xine_ticket_t *this) { unsigned new_size; for(entry = 0; entry < this->holder_thread_count; ++entry) { - if(this->holder_threads[entry].holder == own_id) { + if(pthread_equal(this->holder_threads[entry].holder, own_id)) { /* This thread may already hold this ticket */ this->holder_threads[entry].count++; return (this->holder_threads[entry].count == 1); @@ -210,7 +210,7 @@ static int release_allowed_to_block(xine_ticket_t *this) { unsigned entry; for(entry = 0; entry < this->holder_thread_count; ++entry) { - if(this->holder_threads[entry].holder == own_id) { + if(pthread_equal(this->holder_threads[entry].holder, own_id)) { this->holder_threads[entry].count--; return this->holder_threads[entry].count == 0; } @@ -1710,6 +1710,12 @@ void xine_init (xine_t *this) { /* First of all, initialise libxdg-basedir as it's used by plugins. */ this->basedir_handle = xdgAllocHandle(); + /* + * locks + */ + pthread_mutex_init (&this->streams_lock, NULL); + pthread_mutex_init (&this->log_lock, NULL); + /* initialize color conversion tables and functions */ init_yuv_conversion(); @@ -1791,12 +1797,6 @@ void xine_init (xine_t *this) { this->streams = xine_list_new(); /* - * locks - */ - pthread_mutex_init (&this->streams_lock, NULL); - pthread_mutex_init (&this->log_lock, NULL); - - /* * start metronom clock */ |