From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8816 invoked by alias); 19 Nov 2004 16:26:02 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 8664 invoked from network); 19 Nov 2004 16:25:57 -0000 Received: from unknown (HELO smtp.263.net) (211.150.96.25) by sourceware.org with SMTP; 19 Nov 2004 16:25:57 -0000 Received: from [61.49.118.218] (mta5 [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 566972F863 for ; Sat, 20 Nov 2004 00:25:29 +0800 (CST) (envelope-from qybupt@263.net) Received: from [61.49.118.218] (unknown [61.49.118.218]) by antispam-4 (Coremail:263(040326)) with SMTP id iABXAHkenkH+C3ba.1 for ; Sat, 20 Nov 2004 00:25:29 +0800 (CST) X-TEBIE-Originating-IP: [61.49.118.218] From: zephyr Reply-To: qybupt@263.net To: pthreads-win32@sources.redhat.com Subject: Re: Possible violation of synchronization in pthread_cond_timedwait() Date: Fri, 19 Nov 2004 16:26:00 -0000 User-Agent: KMail/1.6.2 References: <20041118033814.8BE764392B@smtp.263.net> <419C1B3E.1020902@ecosm.com> In-Reply-To: <419C1B3E.1020902@ecosm.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: <200411200025.17327.qybupt@263.net> X-SW-Source: 2004/txt/msg00156.txt.bz2 Thanks, especially to Will Byrant and JamesC. Pulaski. I read the manual of POSIX threads and stuff searched about "spurious wakeup", checking the value of m_curSize after return from the wait of condition variable is very necessary and resolve my problem. At the same time, I had better check the return value when getting the mutex. Thank both of you again, I leaned much from you.:)