This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthreads, cygwin and pthread_mutex_lock not blocking

On May 31, 2005, at 10:50 AM, David Rothenberger wrote:

On 5/31/2005 10:15 AM, Peter Rehley wrote:
Well, here is a simple test case, but turns out I wasn't using the latest version. I was having the problem on 1.5.12, I haven't been able to get a good build with cygwin 1.5.17-1. It builds and I can run the install script, but when I put the dll in place I see the message "cygheap magic number mismatch detected", and gcc doesn't want to work.

I had a similar problem (see <>). It turned out it was because I was using the latest release of binutils. Try rolling back to the previous release.

Ok, I rolled binutils to 20041229, rebuilt and copied the new dll. It's having the same issue that I see in 1.5.12. When I debug the program, I see that the signal is being sent, but it doesn't get executed.

I've looked at the cygwin code, and I have noticed that the sleep (nanosleep) is calling pthread::cancelable_wait, and that will call WaitForMultipleObjects. However, in pthread_mutex::_lock, it's only using WaitForSingleObject. I'm wondering if something like WaitForMultipleObjects should be added to the lock function so that signals (SIGCHLD, in my case) can be handled.

It's just a guess since I'm not an expert with this code.

A Møøse once bit my sister

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]