[PATCH v4] Make bindresvport() function to multithread-safe
Roland McGrath
roland@hack.frob.com
Thu Oct 25 16:31:00 GMT 2012
I think it is indeed obvious without "collecting data" that bindresvport is
both not used widely, and not used frequently in programs that use it. Its
purpose is something that only certain network programs would do, and that
they would do only at startup (or perhaps connection startup).
A local lock satisfies the purposes and does not impose any cost on the
vast majority of programs that do not use the function. Another solution
like using TLS that has collateral cost is only ever warranted once it's
positively demonstrated that the locking approach is too costly in practice.
More information about the Libc-alpha
mailing list