Re: [Jack-Devel] Problem using Jack2 with MinGW and pthreads
Le 21 févr. 2011 à 12:59, torbenh a écrit :
> On Mon, Feb 21, 2011 at 10:03:24AM +0000, Peter Nelson wrote:
>> On Mon, 2011-02-21 at 19:52 +1000, Tim Mayberry wrote:
>>> I've been working on porting an existing application to windows using
>>> the MinGW compiler. The application uses both pthreads via
>>> (http://sourceware.org/pthreads-win32) and the jack API via jack2
>>>
>>> The problem I'm having(I think) is that pthread_t is getting redefined
>>> via jack/systemdeps.h
>>>
>>> The relevant section:
>>>
>>> #elif __MINGW32__ /* MINGW */
>>> #include <stdint.h>
>>> #include <sys/types.h>
>>> #ifndef pthread_t
>>> typedef HANDLE pthread_t;
>>> #endif
>>> #else
>>
>> #ifndef pthread_t seems bogus to me. pthread_t will be a type, not a
>> preprocessor definition.
>>
>> Does commenting out the typedef help?
>
> on the long run jack api should not contain a reference to pthread_t
> i suggest changing it to jack_native_thread_t or somthing.
>
> this doesnt completely solve the problem. but it should get us almost
> there.
> jack_native_thread_t would be HANDLE on windows.
> how to map a pthreads-win32 pthread_t to a HANDLE might be the problem
> we need to solve afterwards.
> but this is an application specific problem then. and not jacks problem.
>
> --
> torben Hohn
>
I agree. Choosing pthread_t was not the best choice for a multi-platform jack..
Stéphane
1298304451.9029_0.ltw:2,a <C9FA4FA1-7D13-4886-BB59-14CA6ADDA1D0 at grame dot fr>