From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7566 invoked by alias); 31 Mar 2009 10:27:54 -0000 Received: (qmail 7552 invoked by uid 22791); 31 Mar 2009 10:27:54 -0000 X-SWARE-Spam-Status: No, hits=0.4 required=5.0 tests=BAYES_40,J_CHICKENPOX_41,SPF_PASS X-Spam-Check-By: sourceware.org Received: from gateway.myrealbox.com (HELO gateway.myrealbox.com) (69.169.150.199) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Mar 2009 10:27:48 +0000 Received: from jtl [140.166.117.45] by myrealbox.com with NetMail ModWeb Module; Tue, 31 Mar 2009 11:51:45 +0200 Subject: pthread_t and stl maps From: "Tobias Ljunggren" To: pthreads-win32@sourceware.org Date: Tue, 31 Mar 2009 10:27:00 -0000 X-Sender: jtl MIME-Version: 1.0 Message-ID: <1238493105.d943181cjtl@myrealbox.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2009/txt/msg00022.txt.bz2 Hello, I've been using pthreads-win32 (rel 2.7.0) for some time but recently chang= ed to current head in CVS due to win64 support. First of all I must say that the upgrade from 2.7.0 was easier than I thoug= ht. A good work to all of you who are involved with the development! I use the same code base for both Linux and Windows builds and it works gre= at. I use a stl map to store some static data that are shared within the same t= hread but not by other threads. The change of pthread_t to a struct require= s a sort function if the key in a map is a thread identifier (pthread_t). What should the correct ordering be? I looked at the code in pthread_equal = and guess that "(left.p < right.p)" isn't enough but is (left.p < right.p &= & left.x < right.x) ok? Best regards, Tobias