From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15976 invoked by alias); 29 Jul 2011 17:29:36 -0000 Received: (qmail 15952 invoked by uid 22791); 29 Jul 2011 17:29:36 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-wy0-f171.google.com (HELO mail-wy0-f171.google.com) (74.125.82.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jul 2011 17:29:12 +0000 Received: by wyi11 with SMTP id 11so450292wyi.2 for ; Fri, 29 Jul 2011 10:29:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.129.18 with SMTP id m18mr2081938wbs.91.1311960550635; Fri, 29 Jul 2011 10:29:10 -0700 (PDT) Received: by 10.227.29.144 with HTTP; Fri, 29 Jul 2011 10:29:10 -0700 (PDT) In-Reply-To: References: Date: Fri, 29 Jul 2011 17:29:00 -0000 Message-ID: Subject: Re: Pthread error? From: Jan Chludzinski To: cygwin@cygwin.com, gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-07/txt/msg00384.txt.bz2 Can't blame IBM either. I had to replace pthread_getthreadid_np() (in the IBM example code) with pthread_self() because Cygwin doesn't support/have pthread_getthreadid_np(). And the IBM docs say pthread_getthreadid_np() returns "a structure containing the hi and low order 4 bytes of the 64bit ID". The 2 "%.8x" would make sense. ---Jan On Fri, Jul 29, 2011 at 1:16 PM, Jan Chludzinski wrote: > Thanks! > > This is an example (from IBM) I cut-and-paste into Emacs to better > understand pthread_once(...). =A0Didn't notice the two "%.8x" in > printf(). > > Thanks again, Jan > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple