MFC after: 1 week
Sponsored by: Klara, Inc.
Details
Details
- Reviewers
kevans fuz - Commits
- rG5af240c54bd2: libc: Simplify __get_locale()
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
The only explanation I can think of for why the code was the way it was is either:
- It just incrementally got that way and it didn't occur to anybody to rewrite it, or
- 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.
Comment Actions
Looks reasonable. Should do the same thing as before, literally.
| lib/libc/locale/xlocale_private.h | ||
|---|---|---|
| 205 | ||