This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
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
- Date: Fri, 29 Jul 2011 13:29:10 -0400
- Subject: Re: Pthread error?
- References: <CADqjQ-J73y4M18LJH9a84VUZ+Pj8JsphW9SX9TDuLgd2YJ0aAg@mail.gmail.com> <CADqjQ-KN6xUZdUwY-ZBvn91anFjyKb_=Rya3w5v25oJwPKRruQ@mail.gmail.com>
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.chludzinski@gmail.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
>