From owner-svn-src-all@FreeBSD.ORG Tue Feb 8 00:06:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA7DF106564A; Tue, 8 Feb 2011 00:06:47 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 881548FC15; Tue, 8 Feb 2011 00:06:47 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.4/8.14.4/NETPLEX) with ESMTP id p17NrrhH016125; Mon, 7 Feb 2011 18:53:53 -0500 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.2.6 (mail.netplex.net [204.213.176.10]); Mon, 07 Feb 2011 18:53:54 -0500 (EST) Date: Mon, 7 Feb 2011 18:53:53 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Jung-uk Kim In-Reply-To: <201102071829.01148.jkim@FreeBSD.org> Message-ID: References: <201102072126.p17LQlwF022935@svn.freebsd.org> <201102071829.01148.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1144747756-1297122833=:3515" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper 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 Reply-To: Daniel Eischen 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: Tue, 08 Feb 2011 00:06:48 -0000 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 > 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--