]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Simplify TCB access expressions
authorUros Bizjak <ubizjak@gmail.com>
Thu, 25 Sep 2025 07:42:15 +0000 (09:42 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 8 Oct 2025 07:35:15 +0000 (09:35 +0200)
commitf48b12aab649e4b02168c56808f14efffffceb14
tree172b6834223d78fb2220d329a9fa74c0e4f17f92
parenta114e29ddd530962d2b44aa9d89f1f6075abe7fa
x86: Simplify TCB access expressions

Replace manual cast with a direct `(__typeof(*descr) __seg_gs *)0`
dereference to access `member`.  This avoids redundant
`offsetof(struct pthread, member)` and improves readability while
preserving semantics.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/i386/nptl/tcb-access.h
sysdeps/i386/nptl/tls.h
sysdeps/x86_64/nptl/tcb-access.h
sysdeps/x86_64/nptl/tls.h