On Monday 07 February 2011 06:12 pm, Garrett Cooper wrote: > On Mon, Feb 7, 2011 at 1:26 PM, Jung-uk Kim <[email protected]> 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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
