"The tls_init() function ... may be called more than once, but not concurrently." Epic fail by @LibreSSL. http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/tls_accept_fds.3?query=tls_init&sec=3 …
@anttikantee It's really not. Since POSIX 2008 pthread_once is part of the base standard. And just linking does not have significant cost.
-
-
@anttikantee C11 also has an equivalent call_once you can use for this. -
@RichFelker@anttikantee and libs like upb feel the need to move from c99 to c89 for compatibility http://blog.reverberate.org/2015/05/status-update-on-upb-and-my-new-role-on.html … -
@RichFelker@anttikantee it sucks to see problems solved in C99 or C11 that can't be used due to a dependency on ancient toolchains -
@asbradbury@RichFelker the real world sucks. even if we start from scratch (which we can't), we'll just postpone suckage by 10 years.
End of conversation
New conversation -
-
-
@RichFelker "just linking does not have significant cost". not true universally, see e.g. NetBSD. -
@RichFelker granted, there pthread_once() will work without -lpthread -
@anttikantee If an OS doesn't have a way to do pthread_once without expensive linking, that's a big QoI flaw in my book.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.