From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23372 invoked by alias); 18 Sep 2006 16:57:21 -0000 Received: (qmail 23361 invoked by uid 22791); 18 Sep 2006 16:57:21 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.quantum.com (HELO mx2.quantum.com) (146.174.252.112) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 18 Sep 2006 16:57:18 +0000 Received: from ppoq3mim2.QUANTUM.COM (imcq32.quantum.com [10.50.4.172]) by mx2.quantum.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k8IGfnda026202 for ; Mon, 18 Sep 2006 10:42:56 -0600 Received: from ppoq3mim3.QUANTUM.COM ([10.50.4.218]) by ppoq3mim2.QUANTUM.COM with Microsoft SMTPSVC(6.0.3790.1830); Mon, 18 Sep 2006 10:57:10 -0600 Received: from MAIL01HQ.adic.com ([172.16.9.27]) by ppoq3mim3.QUANTUM.COM with Microsoft SMTPSVC(6.0.3790.1830); Mon, 18 Sep 2006 10:57:10 -0600 Received: from [172.16.82.133] ([172.16.82.133]) by MAIL01HQ.adic.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 18 Sep 2006 09:56:51 -0700 Message-ID: <450ECFD2.4040804@quantum.com> Date: Mon, 18 Sep 2006 16:57:00 -0000 From: Eric Berge User-Agent: Thunderbird 1.5.0.5 (X11/20060808) MIME-Version: 1.0 To: pthreads-win32@sourceware.org Subject: pthread_cond_destroy bug Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.00% X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2006/txt/msg00051.txt.bz2 I was running a tool recently that flagged some missing LeaveCriticalSection() calls in pthread_cond_destroy(). These are the following two return calls after entering the critical section: if (*cond != PTHREAD_COND_INITIALIZER) { EnterCriticalSection (&ptw32_cond_list_lock); cv = *cond; /* * Close the gate; this will synchronize this thread with * all already signaled waiters to let them retract their * waiter status - SEE NOTE 1 ABOVE!!! */ if (sem_wait (&(cv->semBlockLock)) != 0) { return errno; } /* * !TRY! lock mtxUnblockLock; try will detect busy condition * and will not cause a deadlock with respect to concurrent * signal/broadcast. */ if ((result = pthread_mutex_trylock (&(cv->mtxUnblockLock))) != 0) { (void) sem_post (&(cv->semBlockLock)); return result; } I've fixed this in our local copy but thought I'd pass this along for inclusion in the base code. Thanks, -- Eric -- Eric Berge Quantum Corp. 101 W. Burnsville Pkwy #200 Burnsville, MN 55337 eric.berge@quantum.com 612-747-3439