From owner-svn-src-all@FreeBSD.ORG Mon Feb 7 23:29:13 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 9F2B51065670; Mon, 7 Feb 2011 23:29:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Garrett Cooper Date: Mon, 7 Feb 2011 18:28:58 -0500 User-Agent: KMail/1.6.2 References: <201102072126.p17LQlwF022935@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <201102071829.01148.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r218414 - in head: include lib/libc/include lib/libthr lib/libthr/thread share/man/man3 sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2011 23:29:13 -0000 On Monday 07 February 2011 06:12 pm, Garrett Cooper wrote: > On Mon, Feb 7, 2011 at 1:26 PM, Jung-uk Kim wrote: > > Author: jkim > > Date: Mon Feb �7 21:26:46 2011 > > New Revision: 218414 > > URL: http://svn.freebsd.org/changeset/base/218414 > > > > Log: > > �Introduce a non-portable function pthread_getthreadid_np(3) to > > retrieve �calling thread's unique integral ID, which is similar > > to AIX function of �the same name. �Bump __FreeBSD_version 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 Jung-uk Kim