Page MenuHomeFreeBSD

libc: Use variables more consistent with Variant I for Variant II TLS
ClosedPublic

Authored by jrtc27 on Wed, May 7, 3:00 AM.
Tags
None
Referenced Files
F117247969: D50227.diff
Thu, May 15, 7:24 PM
F117218465: D50227.id155029.diff
Thu, May 15, 10:34 AM
Unknown Object (File)
Wed, May 14, 6:59 AM
Unknown Object (File)
Sun, May 11, 4:12 PM
Unknown Object (File)
Sat, May 10, 3:32 PM
Unknown Object (File)
Sat, May 10, 9:41 AM
Unknown Object (File)
Fri, May 9, 1:04 PM
Unknown Object (File)
Thu, May 8, 8:42 PM
Subscribers

Details

Summary

Firstly, the first argument to __libc_allocate_tls is the old TCB
(versus oldtls, which has less of a clear meaning), so rename it to
oldtcb like Variant I.

Secondly, segbase and oldsegbase are oriented towards what ends up in
the segment registers, but that's not the main concern here, and those
don't convey what they actually point to. Instead, rename segbase to tcb
and change it to a uintptr_t **, and remove oldsegbase as it's always
equal to oldtcb, again both matching Variant I.

Finally, rename tls to tls_block, and add back a (different) tls
variable rather than constantly recomputing tcb - libc_tls_static_space,
again both matching Variant I.

Whilst here, similarly fix the oldtls argument to be oldtcb in the PIC
__libc_allocate_tls stub.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 63983
Build 60867: arc lint + arc unit

Event Timeline

jrtc27 requested review of this revision.Wed, May 7, 3:00 AM

Only include libc changes

This revision is now accepted and ready to land.Wed, May 7, 6:38 PM