Date: Sun, 13 Mar 2011 16:00:17 -0400 From: Daniel Eischen <eischen@vigrid.com> To: Robert Watson <rwatson@freebsd.org> Cc: "threads@freebsd.org" <threads@freebsd.org> Subject: Re: pthread_key_create and !-lpthreads binaries Message-ID: <C0B7104F-E25E-4264-BA7E-0B3F5A11343B@vigrid.com> In-Reply-To: <alpine.BSF.2.00.1103131929440.77294@fledge.watson.org> References: <alpine.BSF.2.00.1103131929440.77294@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Sent from my iPhone On Mar 13, 2011, at 3:33 PM, Robert Watson <rwatson@freebsd.org> wrote: >=20 > Dear threading folk: >=20 > This afternoon I wrote some threaded code for Mac OS X, and then checked i= t out on FreeBSD and was a bit surprised when it compiled but didn't work. T= urns out, of course, that on Mac OS X I'd omitted -lpthread and not noticed,= as the thread primitives are in libSystem. It ran, and the reason I ran in= to trouble is that, although no-op locking calls are fine, getting back "suc= cess" from pthread_key_create() when it has actually failed is problematic. >=20 > Would it be possible to make the thread stub for pthread_key_create() retu= rn an error, instead of succeeding (but not actually succeeding)? Or, perha= ps better yet, I should get a link-time error for that function, even though= I shouldn't get one for lock/unlock? >=20 > Thanks, >=20 > Robert N M Watson > Computer Laboratory > University of Cambridge > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org"= >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C0B7104F-E25E-4264-BA7E-0B3F5A11343B>