Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2007 11:24:26 +0200
From:      Pietro Cerutti <gahr@gahr.ch>
To:        Yuri <yuri@rawbw.com>, User Questions <freebsd-questions@freebsd.org>
Subject:   Re: What is the equivalent of Linux 'gettid' systemcall on FreeBSD?
Message-ID:  <4721B24A.9000902@gahr.ch>
In-Reply-To: <1193366568.47215428811bd@webmail.rawbw.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Yuri wrote:
> Hi,
> 
> I am porting some code to FreeBSD and need to know what todoinstead of Linux gettid?

There isn't an equivalent in FreeBSD. gettid(2) is Linux-specific.
From the man page, if the thread is not part of a thread group created
by passing the flag CLONE_THREAD to clone(2) [yet another Linux-specific
system call] gettid(2) is equivalent to getpid(2).

However, if the application being ported uses clone(2), you'll first
want to decide for a threading library available on FreeBSD.

> 
> Thanks,
> Yuri


-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFHIbJOwMJqmJVx944RCkF7AKCJmnH+97YDQd5URYt7IaQU/Ji1wACgmq5K
KJl4vasneu265NwT8V0A7g4=
=HbhS
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4721B24A.9000902>