This is the mail archive of the
mailing list for the pthreas-win32 project.
RE: Success with pthreads-win32 + gcc/mingw
- To: 'Mumit Khan' <firstname.lastname@example.org.EDU>, email@example.com
- Subject: RE: Success with pthreads-win32 + gcc/mingw
- From: "Bossom, John" <John.Bossom@Cognos.COM>
- Date: Tue, 17 Aug 1999 15:54:11 -0400
Yikes! DllMainCRTStartup is not the same as DllMain.
Are you replacing DllMainCRTStartup with the DllMain provided by
Without the DllMain, thread cleanup and tsd destructors will not happen.
_beginthreadex is responsible for ensuring that the CRT is initialized for
From: Mumit Khan [mailto:firstname.lastname@example.org.EDU]
Sent: Tuesday, August 17, 1999 3:48 PM
Subject: 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
However, I believe that most of the tests were failing earlier due to
- 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).