X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <49ADFA41.4050308@gmail.com> Date: Wed, 04 Mar 2009 03:49:21 +0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: R: Cygwin PThreads bug? References: <568419 DOT 8347 DOT qm AT web25006 DOT mail DOT ukl DOT yahoo DOT com> In-Reply-To: <568419.8347.qm@web25006.mail.ukl.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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/