|
From: | James Crotinger |
Subject: | cygwin/pthread question |
Date: | Fri, 8 Jun 2001 08:42:48 -0700 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |