delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/07/29/13:30:56

X-Recipient: archive-cygwin AT delorie DOT com
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
MIME-Version: 1.0
In-Reply-To: <CADqjQ-KN6xUZdUwY-ZBvn91anFjyKb_=Rya3w5v25oJwPKRruQ@mail.gmail.com>
References: <CADqjQ-J73y4M18LJH9a84VUZ+Pj8JsphW9SX9TDuLgd2YJ0aAg AT mail DOT gmail DOT com> <CADqjQ-KN6xUZdUwY-ZBvn91anFjyKb_=Rya3w5v25oJwPKRruQ AT mail DOT gmail DOT com>
Date: Fri, 29 Jul 2011 13:29:10 -0400
Message-ID: <CADqjQ-KwXX7cPpqNtHyCseZ_u1h5AuGrAAfVZPA-ofiKg3QMFQ@mail.gmail.com>
Subject: Re: Pthread error?
From: Jan Chludzinski <jan DOT chludzinski AT gmail DOT com>
To: cygwin AT cygwin DOT com, gcc-help AT gcc DOT gnu DOT org
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p6THUpjM013244

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
<jan DOT chludzinski AT gmail DOT com> wrote:
> Thanks!
>
> This is an example (from IBM) I cut-and-paste into Emacs to better
> understand pthread_once(...).  Didn'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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019