Date: Wed, 9 Jul 2003 17:17:44 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: freebsd-threads@freebsd.org Subject: null pthread_t Message-ID: <20030710001744.GA7135@Odin.AC.HMC.Edu>
next in thread | raw e-mail | index | archive | help
--PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I've got some Linux pthread code that goes something like this that I'm porting to FreeBSD: ------ pthread_t tid; tid =3D -1; /* Do stuff including maybe creating a thread. */ if (tid !=3D -1) { pthread_cancel(tid); pthread_join(tid, NULL); } ------ Since FreeBSD uses pointers instead of integers for pthread_t's, this generates warnings which go away if you replace -1 with NULL, but it seems like that is likely to do bad things on linux. Is there a portable NULL-equivalent pthread_t? I'm not seeing anything jump out at me in the headers. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/DLCnXY6L6fI4GtQRAjHNAKDUn1xykRWJxSo67Is/tvLhZAF09wCePdb+ adY9Ah11B/6HDE1Oe9g1evA= =gWeh -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030710001744.GA7135>