This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: R: Cygwin PThreads bug?
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 04 Mar 2009 03:49:21 +0000
- Subject: Re: R: Cygwin PThreads bug?
- References: <568419.8347.qm@web25006.mail.ukl.yahoo.com>
Marco Atzeri wrote:
> --- Mer 4/3/09, Nicholas Sherlock ha scritto:
>> This C program:
>> Should run correctly. That is, the second call to
>> pthread_rwlock_rdlock should either succeed (returning
>> zero), having acquired the read lock a second time, or it
>> should fail and return EAGAIN, if the number of simultaneous
>> allowed read locks has been exceeded. It should not fail and
>> return EDEADLK (45), which it is currently doing. Am I
>> reading the spec wrong or is Cygwin non-conforming?
Cygwin has a bug, your reading is correct. Or, I should say, "had" a bug,
since:
> on
> $ uname -a
> CYGWIN_NT-5.1 ITQMOZCAS2NB007 1.7.0(0.200/5/3) 2009-02-20 17:20 i686 Cygwin
>
> compiled with gcc-4
>
> $ ./pthread.exe
> Err 0
And with gcc3 as well; and neither compiler can make it work on 1.5. So
it's a bug that was fixed sometime after 1.5 and before 1.7.
cheers,
DaveK
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/