Mail Archives: cygwin-developers/1999/02/16/16:30:09
On Tue, Feb 16, 1999 at 12:56:03PM +0100, Stipe Tolj wrote:
>> >> Now I'm ready to go ahead in trying to get pthreads running. Geoffrey mentioned
>> >> that the latest winsup snapshot supports a configure options caleld
>> >> --enablethreadsafe to support at least experimental thread support.
>> >> Will this include and build the pthread package or will I have to compile it from
>> >> the pthread-win32 package available at sourceware.cygnus.com?
>> >> The latest pthreads-snap-1999-01-23 claims within README to be unable to compile
>> >> under Cygwin or Mingw. I have compiled successfully the older
>> >> pthreads-snap-10-20, but when linking the example programs I get undefined
>> >> references to _beginthreadex and _endthreadex, which obviously are not supported
>> >> on Win9x systems.
>> >There is now a workaround so that _begin/endthreadex is emulated with
>> I think you are mixing two different packages. The pthreads package that is
>> on sourceware is in no way related to cygwin.
>Yep, I'm aware of this. nm reports that the pthread_* functions are included within the
>cygwin1.dll and libcygwin.a. So I see that there is no need for an external libpthread.a
>> When you compile with --enable-threads you get an experimental thread-safe
>> cygwin1.dll which contains some pthread_* functions.
>But you'll still need a pthread.h file within your standard include paths, say
>/usr/local/include which is not included within the latest winsup snapshot.
>I have rebuild now the cygwin1.dll with the --enable-threadsafe option and replaced all
>produced libs to the cygwin-b20/H-i586-cygwin32/i586-cygwin32/lib directory and of
>course the cygwin1.dll to the bin directory where the old one resides.
>Now about the pthread-win32 package. I took the latest snapshot and extracted the tests
>directory which contains some small example programs for testing pthreads, compiled this
> $ gcc -O2 -I/usr/local/include -c mutex1.c
> $ gcc -o mutex1.exe mutex.o -lcygwin
>The file compiles and links to an exetubale of somewhat about 300 k. When executing the
>file it breaks with an segmentation fault. And gdb reports SIGSEGV within an internal
>Am I missing something, or what is the problem?
You may be missing the fact that the pthread code is experimental and unsupported.
If you would like to submit patches, I'll be happy to look at them.
- Raw text -