Hello
Please get my new email address at
http://www.drzoom.ch/email.html
Sorry for this, bye...
------ This is a copy of the message, including all the headers. ------
Received: from mail01.solnet.ch ([212.101.4.135])
by mail.profzone.ch with esmtp (Exim 3.36 #1)
id 1IsjXy-000BeY-00
for address@hidden; Thu, 15 Nov 2007 19:34:38 +0100
X-Virus-Scanned: by amavisd-new at mail01.solnet.ch
Received: from mail01.solnet.ch ([127.0.0.1])
by localhost (mail01.solnet.ch [127.0.0.1]) (amavisd-new, port 10024)
with LMTP id AX+hWaq7tf9o for <address@hidden>;
Thu, 15 Nov 2007 18:34:32 +0000 (UTC)
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by mail01.solnet.ch (Postfix) with ESMTP id 968672FD513
for <address@hidden>; Thu, 15 Nov 2007 18:34:32 +0000 (UTC)
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
id 1IsjXh-0001s1-Ou
for address@hidden; Thu, 15 Nov 2007 13:34:21 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
id 1IsjXf-0001oH-S3
for address@hidden; Thu, 15 Nov 2007 13:34:21 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43) id 1IsjXf-0001o2-OJ
for address@hidden; Thu, 15 Nov 2007 13:34:19 -0500
Received: from kuber.nabble.com ([216.139.236.158])
by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.60) (envelope-from <address@hidden>) id 1IsjXf-0006AC-4M
for address@hidden; Thu, 15 Nov 2007 13:34:19 -0500
Received: from isper.nabble.com ([192.168.236.156])
by kuber.nabble.com with esmtp (Exim 4.63)
(envelope-from <address@hidden>) id 1IsjXd-0007TB-Si
for address@hidden; Thu, 15 Nov 2007 10:34:17 -0800
Message-ID: <address@hidden>
Date: Thu, 15 Nov 2007 10:34:17 -0800 (PST)
From: manmach <address@hidden>
To: address@hidden
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: address@hidden
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
Cc:
Subject: Mutex does not work on win32/mingw
X-BeenThere: address@hidden
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
<mailto:address@hidden>
List-Archive: <http://lists.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:address@hidden>
List-Help: <mailto:address@hidden>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
<mailto:address@hidden>
Sender: address@hidden
Errors-To: address@hidden
X-ProfZone-Rcpt: address@hidden
X-Envelope-To: address@hidden
It appears that I can enter a mutex from two different threads at the same
time, which should of course be impossible.
I have made a very simple program to test this. It consists of a test class
derived from Thread, which in simply enters and leaves the mutex once every
second.
At the same time the main thread does the same, but twice per second.
As you can see from this little excerpt of the programs output, neither
thread blocks when it should:
main(): entering test
2092: entering test
main(): leavingtest
main(): entering test
2092: leavingtest
main(): leavingtest
This is with version 1.5.7, as 1.5.9 won't even compile.
I am using gcc 3.4.2 mingw to compile.
I have built ccgnu2 1.5.7 by running ./configure, make, make install from
inside the msys environment.
The exact same code works as expected on Linux (ccgnu 1.5.6 on Ubuntu).