DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
- Moved the
errnostorage location out of the TCB and in TLS (into thestruct tls_info_s). - Modified the
errnoaccess definitions and logic that was insched/errnoto use the TLS logic in user space. That logic now resides inlibs/libc/errnosince it is now a user library interface, not a core OS interface. - TLS is now enabled by default. It is enabled in the unaligned mode for the FLAT and PROTECTED build modes but in the highly efficient aligned mode for KERNEL build mode.
- There are no longer an OS system calls related to the error (with the exception of a call to get the
struct tls_info_sin the unaligned TLS mode).
Push-Up vs. Push-Down Stacks
TLS data is always located at the beginning thread's stack. This is true for both CPUs with push-up stacks and CPUs with push-down stacks. This location required in order to access the TLS by ANDing the aligned stack pointer address. The stack memory maps, however, then look very different:
Push Down Push Up+-------------+ +-------------+ <- Stack memory allocation| TLS Data | | TLS Data |+-------------+ +-------------+| | | Task Data* || Available | +-------------+| Stack | | Arguments || | +-------------+| | | || | | Available | || | | Stack | v| | ^ | |+-------------+ | | || Arguments | | |+-------------+ | || Task Data* | | |+-------------+ +-------------+
* Task data is allocated in the main's thread's stack only
TLS interfaces
TLS is a non-standard, but more general interface. It differs from pthread-specific data only in that its semantics are general; the semantics of the pthread-specific data interfaces are focused on pthreads. But they really should share the same common underlying logic.
...