cygwin/pthread question
James Crotinger
JimC at proximation.com
Fri Jun 8 15:42:48 UTC 2001
This isn't Pooma related, but I think there are a number of cygwin users on
the list so I was hoping someone might know the answer or be able to tell me
who to ask.
The following program runs fine from a shell window, but when I try to run
it under gdb, the call to pthread_mutex_init returns EBUSY (16). The
documentation claims this means the the mutex has already been initialized,
which it obviously hasn't. Does cygwin's gdb not work with pthreads? Do I
need to do something special to use it with pthreads? Is there any way to
compile with g++ so that I could use the VC++ debugger to do source level
debugging with this code? Are there any other debugger possibilities? (Note
that this appears to work just fine under Linux.)
#include <iostream>
using std::cout;
using std::endl;
#include <pthread.h>
main()
{
pthread_mutex_t foo;
int result = pthread_mutex_init(&foo, 0);
cout << "pthread_mutex_initialize returned " << result << endl;
return 0;
}
BTW, I'm using gdb 5.0 (20010428-1) and gcc 2.95.3-4.
Thanks,
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20010608/4c44ea3d/attachment.html>
More information about the pooma-dev
mailing list