Mail Archives: cygwin-developers/1999/02/16/12:13:01
> >> 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
> >CreateThread.
>
> 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
lib.
> 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
way
$ 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
_stack_xxxx function.
Am I missing something, or what is the problem?
As mentioned everything on a Win98 machine.
Regards,
Stipe
--
Stipe Tolj <tolj AT uni-duesseldorf DOT de>
Cygwin Porting Project -- "We build UNIX on top of Windows"
http://www.student.uni-koeln.de/cygwin/
Department of Economical Computer Science
University of Cologne, Germany
- Raw text -