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
[-- Attachment #1 --]
I've got some Linux pthread code that goes something like this that I'm
porting to FreeBSD:
------
pthread_t tid;
tid = -1;
/* Do stuff including maybe creating a thread. */
if (tid != -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
--
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/DLCnXY6L6fI4GtQRAjHNAKDUn1xykRWJxSo67Is/tvLhZAF09wCePdb+
adY9Ah11B/6HDE1Oe9g1evA=
=gWeh
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030710001744.GA7135>
