threads/150959: [libc] Stub pthread_once in libc should call _libc_once

John Baldwin jhb at FreeBSD.org
Mon May 16 14:00:25 UTC 2011


The following reply was made to PR threads/150959; it has been noted by GNATS.

From: John Baldwin <jhb at FreeBSD.org>
To: bug-followup at FreeBSD.org, temporal at gmail.com
Cc:  
Subject: Re: threads/150959: [libc] Stub pthread_once in libc should call
 _libc_once
Date: Mon, 16 May 2011 09:57:38 -0400

 FWIW, I would also prefer that we fix libstdc++ to not depend on this 
 misfeature and properly implement pthread_once() using _libc_once() in 
 the non-threaded case as well.
 
 One advantage of fixing libstdc++ to honor __isthreaded would be that 
 single threaded C++ apps that linked against libthr (due to using 3rd 
 party libraries that can use threads but the specific app doesn't enable 
 that, e.g. protobuf) would not always use locks unnecessarily in all of 
 libstdc++.
 
 -- 
 John Baldwin


More information about the freebsd-threads mailing list