Commit Graph

8 Commits

Author SHA1 Message Date
Huang Qi e516c6247e sched: Implement task local storage
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-23 22:05:02 +08:00
Huang Qi 18227cbeff libc/tls: Supports up to 64 elements
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-23 22:05:02 +08:00
Gregory Nutt 9ce03b1660 Move pthread-specific data into TLS
1. Move pthread-specific data files from sched/pthread/ to libs/libc/pthread.
2. Remove pthread-specific data functions from syscalls.
3. Implement tls_alloc() and tls_free() with system calls.
4. Reimplement pthread_key_create() and pthread_key_free() using tls_alloc() and tls_free().
5. Reimplement pthread_set_specific() and pthread_get_specicif() using tls_set_value() and tls_get_value()
2020-05-08 18:05:04 +01:00
Gregory Nutt 3dca5eba15 Completes the Implementation of the TLS-based errno
- Remove per-thread errno from the TCB structure (pterrno)
- Remove get_errno() and set_errno() as functions.  The macros are still available as stubs and will be needed in the future if we need to access the errno from a different address environment (KERNEL mode).
- Add errno value to the tls_info_s structure definitions
- Move sched/errno to libs/libc/errno.  Replace old TCB access to the errno with TLS access to the errno.
2020-05-07 23:11:34 +01:00
Gregory Nutt c2244a2382 Remove CONFIG_TLS
A first step in implementing the user-space error is force TLS to be enabled at all times.  It is no longer optional
2020-05-07 12:04:16 -06:00
Abdelatif Guettouche b7e7fba732 TLS_UNALIGNED (#2)
* Implement the TLS_UNALIGNED
2020-05-05 18:56:33 +01:00
Gregory Nutt b1071cca00 libs/libc/tls/Kconfig: Add CONFIG_TLS_ALIGNED
CONFIG_TLS_ALIGNED will select the (legacy) aligned stack implementation of TLS.  If CONFIG_TLS_ALIGNED is not defined, then the new, implementation of TLS using an unaligned stack will be enabled.
2020-05-05 18:56:33 +01:00
Gregory Nutt cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00