bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] --with-threads on MinGW


From: Nils Durner
Subject: Re: [Patch] --with-threads on MinGW
Date: Mon, 04 Dec 2006 22:18:29 +0100
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

>> -#ifdef HAVE_STRUCT_TIMESPEC
>> +#if HAVE_STRUCT_TIMESPEC || SCM_I_GSC_USE_PTHREAD_THREADS
>> pf ("typedef struct timespec scm_t_timespec;\n");
>
> Does the detection of struct timespec go wrong somehow?
The only timespec declaration on Win32 is the one in pthread.h, that's
why I or'ed  SCM_I_GSC_USE_PTHREAD_THREADS.
scm's own timespec declaration is considered "incompatible" for some reason.

>> +#ifndef __MINGW32__
>> + sigset_t all_sigs;
>> +
>> sigfillset (&all_sigs);
>> scm_i_pthread_sigmask (SIG_SETMASK, &all_sigs, NULL);
>> +#endif
>
> I think I'd rather either conditionalize on the existance of
> pthread_sigmask, or perhaps make some dummy sigset stuff if it doesn't
> exist.
OK, makes sense.

>> +#ifndef __MINGW32__
>> + t->pthread,
>> +#else
>> + t->pthread.p,
>> +#endif
>
> What does that do?
Pthreads-win32 defines pthread_t as struct.

>> #if SCM_USE_PTHREAD_THREADS
>> /* pthread_getattr_np not available on MacOS X and Solaris 10. */
>> -#if HAVE_PTHREAD_ATTR_GETSTACK && HAVE_PTHREAD_GETATTR_NP
>> +#if (HAVE_PTHREAD_ATTR_GETSTACK && HAVE_PTHREAD_GETATTR_NP) ||
>> __MINGW32__
>
> Remind us what's wrong with the getstack detection ...
pthread_attr_getstack() exists, but pthread_getattr_np() doesn't.
This is just to get the #define HAVE_GET_... and the definition of
get_thread_stack_base().


Nils





reply via email to

[Prev in Thread] Current Thread [Next in Thread]