svn commit: r227999 - head/lib/libc/gen
John Baldwin
jhb at freebsd.org
Mon Nov 28 16:45:49 UTC 2011
On Saturday, November 26, 2011 10:57:09 am David Chisnall wrote:
> Author: theraven
> Date: Sat Nov 26 15:57:09 2011
> New Revision: 227999
> URL: http://svn.freebsd.org/changeset/base/227999
>
> Log:
> Return not-implemented from pthread_once and pthread_key_create, rather
> than silently failing and returning success.
>
> Without this, code calls pthread_once(), receives a return value of
> success, and thinks that the passed function has been called.
>
> Approved by: dim (mentor)
Hmmm, is this really the best fix?
I really want pthread_once() to always work (see the hack I have to do with
_once() in libc to workaround the fact that it doesn't now). The current
behavior exists to appease libstdc++ which uses a silently failing
pthread_once() to figure out if it is linked against working threads.
If this is for libc++, can you provide some other way than abusing
pthread_once() to determine this? Ideally it would be as smart as libc and
use __isthreaded in some fastion.
--
John Baldwin
More information about the svn-src-head
mailing list