Page MenuHomeFreeBSD

libc: Simplify __get_locale()
ClosedPublic

Authored by des on Tue, Nov 25, 7:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 8, 8:06 AM
Unknown Object (File)
Thu, Dec 4, 12:20 AM
Unknown Object (File)
Mon, Dec 1, 11:21 PM
Unknown Object (File)
Sun, Nov 30, 8:41 AM
Unknown Object (File)
Thu, Nov 27, 7:49 AM
Unknown Object (File)
Thu, Nov 27, 7:18 AM
Unknown Object (File)
Wed, Nov 26, 12:10 PM
Unknown Object (File)
Wed, Nov 26, 12:03 PM
Subscribers

Diff Detail

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

Event Timeline

des requested review of this revision.Tue, Nov 25, 7:54 PM

The only explanation I can think of for why the code was the way it was is either:

  1. It just incrementally got that way and it didn't occur to anybody to rewrite it, or
  2. It actually matters for some deep branch prediction / speculative execution magic reasons

Can anyone shed some light on this?

Note that __has_thread_locale is global while __thread_locale is thread-local.

Looks reasonable. Should do the same thing as before, literally.

lib/libc/locale/xlocale_private.h
205
This revision is now accepted and ready to land.Tue, Nov 25, 8:03 PM
This revision was automatically updated to reflect the committed changes.