[vlc-devel] [PATCH] Use Mach semaphores on Mac OS X

Juho Vähä-Herttua juhovh at iki.fi
Thu May 6 16:59:40 CEST 2010


On 6.5.2010, at 16.15, Juho Vähä-Herttua wrote:
> There's one problem with the patch. It calls for VLC_THREAD_ASSERT that calls vlc_thread_fatal on debug, which in turn calls strerror_r, which fails because the return value is not errno value but instead kern_return_t. ILEoo also mentioned that after semaphore_destroy the condition should be val == KERN_SUCCESS instead of != check.

Last patch was complete crap: in addition to the above, semaphore_destroy didn't reference the pointer, error code path of vlc_sem_post didn't return a value correctly on non-Mac platform. Second attempt included, I used EINVAL for all error cases since it was easy and VLC_THREAD_ASSERT is already there.


Juho


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pthread-Use-Mach-semaphores-instead-of-POSIX-semapho.patch
Type: application/octet-stream
Size: 3537 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100506/551dd895/attachment.obj>
-------------- next part --------------





More information about the vlc-devel mailing list