3 ms·
> every access to a TLS variable involves a function call I'm pretty sure I've taken a pointer ref to a threadlocal. How does that work?
by throwawaymaths 2y ago
> every access to a TLS variable involves a function call
I'm pretty sure I've taken a pointer ref to a threadlocal. How does that work?
- o11c 2y agoThat uses the result of the function directly, rather than dereferencing it. Just like how the glibc `errno` macro works, except that `errno` is special (in several ways) rather than a normal thread-local (which, ironically, would be more efficient).