Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed deadlock when starting LiveTV through myth://
libcmyth now uses a recursive mutex to allow the thread holding the connection lock to get passed another lock.
- Loading branch information
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just want to warn you about PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP portability.
it does not exist on FreeBSD.
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it also effects osx/ios.
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a recursive mutex on those platforms that can be used?
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can someone with FreeBSD / OSX check if PTHREAD_RECURSIVE_MUTEX_INITIALIZER exists. If so either I can change tonight after work or could you change directly. Presumable the _NP means non-portable?
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see xbmc/threads/XBMC_mutex.cpp
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Davilla. There seems to be a spelling mistake in the first if def section in XBMC_mutex.cpp. XBCM_PTHREAD_MUTEX_RECURSIVE != XBMC_PTHREAD_MUTEX_RECURSIVE
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, noted
b2738b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://lists.apple.com/archives/unix-porting/2002/Sep/msg00079.html
neither PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP nor PTHREAD_RECURSIVE_MUTEX_INITIALIZER exists on osx and I also suspect any bsd base system.