[vlc-devel] [PATCH v2 14/18] nacl: Add custom thread implementation
dhamester at jusst.de
Wed Mar 15 12:27:10 CET 2017
On 13.03.2017 20:35, Rémi Denis-Courmont wrote:
> Le maanantaina 13. maaliskuuta 2017, 12.37.00 EET Dennis Hamester a écrit :
>> From: Dennis Hamester <dennis.hamester at startmail.com>
>> Similar to Android, NaCl has a pthread implementation without support
>> for thread cancellation.
>> We reuse posix/thread_nocancel and complement that with a custom
>> implementation of futexes, which falls back to pthread mutexes and
>> condition variables. Actual futexes are not available to regular
>> NaCl modules.
> Why do you simulate futeces when you could implement condition variables
Our goal was to reuse src/android/thread.c, because it has a known
working implementation of what VLC needs + custom cancel. And that file
The only alternative I see is to add a new branch in vlc_threads.h for
nacl and implement everything ourselves with the exception of maybe some
smaller parts in misc/threads.c. We can do it, but it will take time and
there are many subtitles with regards to thread cancellation to get
wrong. I'd rather not go down that road.
So, it is unfortunately not just condvars that we'd have to implement.
If you have suggestions, please share them.
> It made sense on Android - because Android supports them natively.
jusst technologies GmbH
tel: +49 (0)40 1800 86 75
fax: +49 (0)40 1800 86 76
mail: dhamester at jusst.de
Ohlstedter Straße 12
Vertretungsberechtigte Geschäftsführer: Julian Scheel, Wolfgang Scheel
Registergericht: Amtsgericht Hamburg
Registernummer: HRB 94300
USt-ID-Nr.: DE 243309917
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 862 bytes
Desc: OpenPGP digital signature
More information about the vlc-devel