Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <028801c10c17$d38870c0$806410ac@local> From: "Robert Collins" To: "Ken Tew" , References: Subject: Re: Bug in pthread_cond_signal under Win NT 4.0 Date: Sat, 14 Jul 2001 13:48:20 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-OriginalArrivalTime: 14 Jul 2001 03:35:08.0058 (UTC) FILETIME=[FA8E97A0:01C10C15] Ken, what version of the cygwin .dll did you create this patch against? IIRC we fixed this bug a few weeks ago. Rob ----- Original Message ----- From: "Ken Tew" To: Sent: Saturday, July 14, 2001 6:10 AM Subject: Bug in pthread_cond_signal under Win NT 4.0 > > If you signal a condition variable without any threads actually waiting > on the condition variable, then when a thread does wait on that variable > it will hang. > > I've attached the file pthread_bug_test.cpp which is a simple program to > demonstrate the bug. > > I also attached a modified thread.cc which fixes the bug. It simply > checks to see if any threads are waiting on the condition before > signalling. The only change I made to thread.cc was adding the line: > if (waiting) > at line 452 in the file. > > ---------- > \////// > [ O o ] > Ken Tew - Licensed to Program \_=_/ > http://www.pitt.edu/~ktew _| |_ > / \_/ \ > ________________________________________oOOO___OOOo__ > ---------------------------------------------------------------------------- ---- > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/