[vlc-devel] Question about vlc_mutex_lock/unlock in Android

Nick Briggs briggs at parc.com
Wed Dec 5 02:35:50 CET 2012


I'm seeing behavior from vlc_mutex_lock/vlc_mutex_unlock in VLC (git master branch at commit 60b01d4cbea10327517429c42bcf31cccfbd2567) on Android (4.0.3, kernel 3.0.15-I9100UHLPE-CL200654, a Samsung Galaxy S II) that I don't expect, and wonder if anyone else has encountered the same issue --

I have an input processing thread (Thread 2, below) that is synchronizing with a network event thread (Thread 1), and pretty repeatably I'll see
...
Thread 1: 	mutex lock
Thread 2:	mutex lock (blocks, expected)
Thread 1:	mutex unlock
Thread 2:	mutex lock taken (as expected)
Thread 2:	mutex unlock
Thread 1:	mutex lock
Thread 2:	mutex lock (blocks, expected)
Thread 1:	mutex unlock	(at this point thread 2 should have got control since it was waiting on the mutex that was just released...)
Thread 1:	mutex lock		(...however it does not, but Thread 1 continues to handle events...)
Thread 1:	mutex unlock
Thread 1:	mutex lock
Thread 1:	mutex unlock
Thread 1:	mutex lock
Thread 1:	mutex unlock
Thread 1:	mutex lock
Thread 1:	mutex unlock

... this repeats until the video output freezes because Thread 2 never again makes any progress.

-- Nick Briggs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4313 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20121204/37a2490f/attachment.bin>


More information about the vlc-devel mailing list