Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2011 18:53:53 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper <gcooper@freebsd.org>
Subject:   Re: svn commit: r218414 - in head: include lib/libc/include lib/libthr lib/libthr/thread share/man/man3 sys/sys
Message-ID:  <Pine.GSO.4.64.1102071846120.3515@sea.ntplx.net>
In-Reply-To: <201102071829.01148.jkim@FreeBSD.org>
References:  <201102072126.p17LQlwF022935@svn.freebsd.org> <AANLkTinwaMyp3nh5tD34jnpwEjEx%2BJhC9BBuy6=GYM4S@mail.gmail.com> <201102071829.01148.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-1144747756-1297122833=:3515
Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Mon, 7 Feb 2011, Jung-uk Kim wrote:

> On Monday 07 February 2011 06:12 pm, Garrett Cooper wrote:
>> On Mon, Feb 7, 2011 at 1:26 PM, Jung-uk Kim <jkim@freebsd.org>
> wrote:
>>> Author: jkim
>>> Date: Mon Feb =EF=BF=BD7 21:26:46 2011
>>> New Revision: 218414
>>> URL: http://svn.freebsd.org/changeset/base/218414
>>>
>>> Log:
>>> =EF=BF=BDIntroduce a non-portable function pthread_getthreadid_np(3) to
>>> retrieve =EF=BF=BDcalling thread's unique integral ID, which is similar
>>> to AIX function of =EF=BF=BDthe same name. =EF=BF=BDBump __FreeBSD_vers=
ion to
>>> note its introduction.
>>
>>     Stupid question: how is this different from pthread_self() ?
>> Isn't the pthread_t value returned unique across the system, or is
>> it relative to the process somehow?
>
> pthread_self(3) returns an opaque type pthread_t, e.g.,
> pthread_equal(3) must be used to compare two thread IDs.
> pthread_getthreadid_np(3) returns an integral type int, which is
> actually td_tid of the calling thread for libthr(3).
>
> Please see the following discussion:
>
> http://docs.freebsd.org/cgi/mid.cgi?201102071558.03573.jkim

Yes, we understand that Linux has it, and IBM has made
some sort of compat functions for accomplishing the same,
but why are developers so lazy that they cannot use
pthread_equal() instead of "=3D"?  Or use something like
pthread_[gs]etspecific()?

Yes, this is a rhetorical question.  Since Linux has it,
we must also :-(

--=20
DE
---559023410-1144747756-1297122833=:3515--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.1102071846120.3515>