diff options
author | Carlo Bramini <carlo.bramix@libero.it> | 2008-03-14 20:05:34 +0000 |
---|---|---|
committer | Carlo Bramini <carlo.bramix@libero.it> | 2008-03-14 20:05:34 +0000 |
commit | fbd93b493f7c694e1c750b110ded431a65cb9664 (patch) | |
tree | c1649989469549cc8c51ec6627944e00a7cd1863 | |
parent | 7a3a1e423dd9cfcc47152509474bea108fff444f (diff) | |
download | xine-lib-fbd93b493f7c694e1c750b110ded431a65cb9664.tar.gz xine-lib-fbd93b493f7c694e1c750b110ded431a65cb9664.tar.bz2 |
Unportable pthread_t compare in xine.c
With Pthreads for Win32/Win64 I cannot compare two pthread_t items because
they are implemented as structures. This patch fixes the comparison by
using pthread_equal() function.
--HG--
extra : transplant_source : %9D%98%CE%83%5E%BD%A9u%11%C7%3BmP%28%EBH%D0%B6I%DF
-rw-r--r-- | src/xine-engine/xine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index c207680e6..efb845be5 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -133,7 +133,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); @@ -204,7 +204,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; } |