This is the mail archive of the pthreads-win32@sourceware.cygnus.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Success with pthreads-win32 + gcc/mingw


I finally had the time to write a first-cut win32 thread support for gcc 
runtime, and now all the tests pass when I build with mingw/msvcrt port
of gcc-2.95.

However, I believe that most of the tests were failing earlier due to 
configuration bugs:

  - DllMain@12 is not an entry point as done in the Makefile. That should
    be removed. The entry point is _DllMainCRTStartup, which is taken
    care of automatically. The defaults will work just as well.
  - there are some issues with the thread startup routine passed to
    _beginthreadex. It *has* to be defined __stdcall as well.
  - few nits here and there.

I'll send my changes along after I do a few more tests, and integrate my
changes into an updated CVS tree. 

I'd also like to add support for CRTDLL, but I need to take a look at how
the extra parameters to _beginthreadex that is not in _beginthread is 
being used. beginthread will always start the thread running, and also
doesn't return the thread id (which you can get in other ways of course).

Others will not be able to build it with gcc-2.95 release unfortunately; If
things go well, I'll put together a thread-safe runtime package as an add
on (just libgcc.a if I remember correctly).

Regards,
Mumit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]