From owner-freebsd-questions@FreeBSD.ORG Fri Oct 26 09:24:34 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACD2516A418 for ; Fri, 26 Oct 2007 09:24:34 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 67F3813C4A8 for ; Fri, 26 Oct 2007 09:24:34 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from 85-218-3-50.dclient.lsne.ch ([85.218.3.50] helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IlLQe-0007oZ-EH; Fri, 26 Oct 2007 11:24:32 +0200 Message-ID: <4721B24A.9000902@gahr.ch> Date: Fri, 26 Oct 2007 11:24:26 +0200 From: Pietro Cerutti User-Agent: Thunderbird 2.0.0.6 (X11/20070808) MIME-Version: 1.0 To: Yuri , User Questions References: <1193366568.47215428811bd@webmail.rawbw.com> In-Reply-To: <1193366568.47215428811bd@webmail.rawbw.com> X-Enigmail-Version: 0.95.2 OpenPGP: id=9571F78E; url=http://www.gahr.ch/pgp Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigEEBCC60790816834B08215E0" X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - gahr.ch X-Source: X-Source-Args: X-Source-Dir: Cc: Subject: Re: What is the equivalent of Linux 'gettid' systemcall on FreeBSD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2007 09:24:34 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEEBCC60790816834B08215E0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yuri wrote: > Hi, >=20 > 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. =46rom 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. >=20 > Thanks, > Yuri --=20 Pietro Cerutti PGP Public Key: http://gahr.ch/pgp --------------enigEEBCC60790816834B08215E0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHIbJOwMJqmJVx944RCkF7AKCJmnH+97YDQd5URYt7IaQU/Ji1wACgmq5K KJl4vasneu265NwT8V0A7g4= =HbhS -----END PGP SIGNATURE----- --------------enigEEBCC60790816834B08215E0--