Page MenuHomeFreeBSD

libc: Simplify __get_locale()
ClosedPublic

Authored by des on Tue, Nov 25, 7:54 PM.
Tags
None
Referenced Files
F137856231: D53908.id167095.diff
Wed, Nov 26, 12:10 PM
F137855885: D53908.id167095.diff
Wed, Nov 26, 12:03 PM
F137838672: D53908.diff
Wed, Nov 26, 7:30 AM
F137830005: D53908.id.diff
Wed, Nov 26, 5:35 AM
F137819920: D53908.diff
Wed, Nov 26, 3:08 AM
Subscribers

Details

Summary

MFC after: 1 week
Sponsored by: Klara, Inc.

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.