[mercury-users] parallel grades in windows

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Nov 3 20:46:24 AEDT 2010


Hi,

On Thu, 28 Oct 2010, Sergey Khorev wrote:

>>> Does Mercury support native Win32 thread API at all? I was not able to
>>> find either of _beginthreadex or CreateThread in the sources.
>>
>> Mercury doesn't, it requires POSIX threads at the moment; the Boehm
>> collector does.  (The GC_* macros only affect the latter.)
>
> I am just wondering what is the point in using GC_WIN32_THREADS by
> default when compiling par grades? This will not work.

With the current version of the collector, when building on MinGW
and using pthreads-win32 I agree there doesn't seem to be any point
since it doesn't work.

I'm not sure whether this is because using GC_WIN32_THREADS can't work
or if it just because there is a problem using it with Boehm GC
7.2alpha4 -- given the number of Windows related changes that have
been made to the collector since 7.2alpha4 I suspect it may be the latter.
(I guess another possibility is that the use of GC_WIN32_THREADS
is incompatible with the use of the pthreads-win32 library.)

Building the par grades on Cygwin does use GC_WIN32_THREADS and that
does indeed work, i.e. building them so they depend on cygwin.dll,
not just building native WIndows libraries under Cygwin.

I've added an option to configure to tell it to set GC_WIN32_PTHREADS.
On MinGW we should probably just make that the default if pthreads-win32
is being used.

Julien.


More information about the users mailing list