Page MenuHomeFreeBSD

getnetconfig: make nc_error a thread local variable
ClosedPublic

Authored by brooks on Mon, Feb 16, 2:17 PM.
Tags
None
Referenced Files
F148051152: D55310.diff
Sun, Mar 15, 10:37 AM
F148051146: D55310.diff
Sun, Mar 15, 10:37 AM
Unknown Object (File)
Fri, Mar 13, 1:46 PM
Unknown Object (File)
Fri, Mar 13, 1:45 PM
Unknown Object (File)
Thu, Mar 12, 9:42 PM
Unknown Object (File)
Wed, Mar 11, 12:33 PM
Unknown Object (File)
Wed, Mar 11, 8:00 AM
Unknown Object (File)
Wed, Mar 11, 7:11 AM
Subscribers

Details

Summary

Remove a bunch of complexity at the cost of 4 bytes of storage per
thread.

Sponsored by: DARPA, AFRL

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I suspect the complexity wasn't to avoid 4 bytes per thread but more because TLS wasn't reliably working on all of our architectures when this was first written (but I could be wrong). :)

This revision is now accepted and ready to land.Wed, Feb 25, 1:45 AM
In D55310#1269811, @jhb wrote:

I suspect the complexity wasn't to avoid 4 bytes per thread but more because TLS wasn't reliably working on all of our architectures when this was first written (but I could be wrong). :)

I'm sure that's true, it just turns out to be a small benefit in the common case. There are a bunch more of these that I'm tempted to convert, but they involve large structs.