libc/tls: Change the default value of TLS_NELEM to zero
to ensure the default config as small as possible. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
97ed003842
commit
a51be33a41
48 changed files with 15 additions and 43 deletions
|
@ -95,14 +95,18 @@ NXSYMBOLS(pthread_cond_init)
|
|||
NXSYMBOLS(pthread_cond_signal)
|
||||
NXSYMBOLS(pthread_cond_wait)
|
||||
NXSYMBOLS(pthread_create)
|
||||
#if CONFIG_TLS_NELEM > 0
|
||||
NXSYMBOLS(pthread_getspecific)
|
||||
NXSYMBOLS(pthread_key_create)
|
||||
#endif
|
||||
NXSYMBOLS(pthread_kill)
|
||||
NXSYMBOLS(pthread_mutex_destroy)
|
||||
NXSYMBOLS(pthread_mutex_init)
|
||||
NXSYMBOLS(pthread_mutex_lock)
|
||||
NXSYMBOLS(pthread_mutex_unlock)
|
||||
#if CONFIG_TLS_NELEM > 0
|
||||
NXSYMBOLS(pthread_setspecific)
|
||||
#endif
|
||||
NXSYMBOLS(pthread_sigmask)
|
||||
NXSYMBOLS(puts)
|
||||
NXSYMBOLS(read)
|
||||
|
|
|
@ -164,3 +164,4 @@ CONFIG_SYSTEM_PING=y
|
|||
CONFIG_SYSTEM_TEE=y
|
||||
CONFIG_TEENSY_41=y
|
||||
CONFIG_TEENSY_41_PIKRON_BB=y
|
||||
CONFIG_TLS_NELEM=4
|
||||
|
|
|
@ -51,5 +51,4 @@ CONFIG_START_MONTH=2
|
|||
CONFIG_START_YEAR=2013
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -51,5 +51,4 @@ CONFIG_START_MONTH=2
|
|||
CONFIG_START_YEAR=2013
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -61,5 +61,4 @@ CONFIG_STACK_COLORATION=y
|
|||
CONFIG_START_YEAR=2015
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -164,6 +164,7 @@ CONFIG_SYSTEM_SETLOGMASK=y
|
|||
CONFIG_SYSTEM_SYSTEM=y
|
||||
CONFIG_SYSTEM_TEE=y
|
||||
CONFIG_SYSTEM_TELNET_CLIENT=y
|
||||
CONFIG_TLS_NELEM=4
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USBDEV_COMPOSITE=y
|
||||
CONFIG_USBHOST_COMPOSITE=y
|
||||
|
|
|
@ -785,7 +785,6 @@ Configurations
|
|||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DISABLE_PTHREAD=y
|
||||
CONFIG_MQ_MAXMSGSIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
CONFIG_PREALLOC_MQ_MSGS=0
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ CONFIG_START_YEAR=2013
|
|||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_UART1_RXBUFSIZE=64
|
||||
CONFIG_UART1_SERIAL_CONSOLE=y
|
||||
CONFIG_UART1_TXBUFSIZE=64
|
||||
|
|
|
@ -44,4 +44,3 @@ CONFIG_START_YEAR=2013
|
|||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
|
|
|
@ -73,4 +73,3 @@ CONFIG_START_YEAR=2013
|
|||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
|
|
|
@ -49,4 +49,3 @@ CONFIG_START_YEAR=2021
|
|||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
|
|
|
@ -69,5 +69,4 @@ CONFIG_STM32_PWR=y
|
|||
CONFIG_STM32_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -51,5 +51,4 @@ CONFIG_STM32_PWR=y
|
|||
CONFIG_STM32_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -99,7 +99,6 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y
|
|||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_TIME64=y
|
||||
CONFIG_TASK_NAME_SIZE=12
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_RXBUFSIZE=32
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
|
|
|
@ -123,7 +123,6 @@ CONFIG_SYSTEM_COMPOSITE=y
|
|||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_TIME64=y
|
||||
CONFIG_TASK_NAME_SIZE=12
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_RXBUFSIZE=32
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
|
|
|
@ -111,7 +111,6 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y
|
|||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_TIME64=y
|
||||
CONFIG_TASK_NAME_SIZE=12
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_RXBUFSIZE=32
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
|
|
|
@ -74,7 +74,6 @@ CONFIG_STM32_USART1=y
|
|||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=12
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_RXBUFSIZE=32
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
|
|
|
@ -72,7 +72,6 @@ CONFIG_STM32_USART1=y
|
|||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_READLINE=y
|
||||
CONFIG_TASK_NAME_SIZE=12
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_RXBUFSIZE=32
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
|
|
|
@ -61,4 +61,3 @@ CONFIG_STM32_PWR=y
|
|||
CONFIG_STM32_RTC=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
|
|
|
@ -45,7 +45,6 @@ CONFIG_STM32_PWR=y
|
|||
CONFIG_STM32_USART1=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_BAUD=57600
|
||||
CONFIG_USART1_RXBUFSIZE=64
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -57,5 +57,4 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -50,5 +50,4 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -64,5 +64,4 @@ CONFIG_STM32F0L0G0_USART2=y
|
|||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NSH_STACKSIZE=1024
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -61,5 +61,4 @@ CONFIG_STM32F0L0G0_SPI1=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -56,7 +56,6 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_RXBUFSIZE=32
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
CONFIG_USART2_TXBUFSIZE=32
|
||||
|
|
|
@ -58,5 +58,4 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -61,5 +61,4 @@ CONFIG_STM32F0L0G0_SPI1=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -107,5 +107,4 @@ CONFIG_SYSTEM_I2CTOOL=y
|
|||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TIMER=y
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -48,5 +48,4 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -50,5 +50,4 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -61,5 +61,4 @@ CONFIG_STM32F0L0G0_SPI1=y
|
|||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -43,7 +43,6 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART1=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_RXBUFSIZE=32
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
|
|
|
@ -43,7 +43,6 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART1=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_RXBUFSIZE=32
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
|
|
|
@ -53,7 +53,6 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART3=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART3_SERIAL_CONSOLE=y
|
||||
CONFIG_USERLED=y
|
||||
CONFIG_USERLED_LOWER=y
|
||||
|
|
|
@ -76,7 +76,6 @@ CONFIG_STM32F0L0G0_SPI1_COMMTYPE=1
|
|||
CONFIG_STM32F0L0G0_USART3=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART3_SERIAL_CONSOLE=y
|
||||
CONFIG_USERLED=y
|
||||
CONFIG_USERLED_LOWER=y
|
||||
|
|
|
@ -46,5 +46,4 @@ CONFIG_STM32F0L0G0_PWR=y
|
|||
CONFIG_STM32F0L0G0_USART1=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -59,4 +59,5 @@ CONFIG_STM32_ROMFS=y
|
|||
CONFIG_STM32_ROMFS_IMAGEFILE="../../apps/examples/elf/tests/romfs.img"
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=4
|
||||
CONFIG_USART3_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -53,5 +53,4 @@ CONFIG_TIVA_GPIOF_IRQS=y
|
|||
CONFIG_TIVA_GPIOG_IRQS=y
|
||||
CONFIG_TIVA_SSI0=y
|
||||
CONFIG_TIVA_UART0=y
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -40,7 +40,6 @@ CONFIG_START_MONTH=7
|
|||
CONFIG_START_YEAR=2011
|
||||
CONFIG_SYSTEM_USBMSC=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_USART1_BAUD=38400
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USBDEV=y
|
||||
|
|
|
@ -36,4 +36,3 @@ CONFIG_START_MONTH=2
|
|||
CONFIG_START_YEAR=2009
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TLS_NELEM=0
|
||||
|
|
|
@ -77,6 +77,7 @@ CONFIG_TESTING_GETPRIME=y
|
|||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TIMER=y
|
||||
CONFIG_TIMER_ARCH=y
|
||||
CONFIG_TLS_NELEM=4
|
||||
CONFIG_UART0_BAUD=2000000
|
||||
CONFIG_UART0_RXBUFSIZE=128
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -64,4 +64,5 @@ CONFIG_SYSTEM_NSH=y
|
|||
CONFIG_TASK_NAME_SIZE=20
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TLS_NELEM=4
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -54,4 +54,5 @@ CONFIG_START_YEAR=2020
|
|||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=12
|
||||
CONFIG_TLS_NELEM=4
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -61,4 +61,5 @@ CONFIG_START_YEAR=2011
|
|||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSLOG_BUFFER=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TLS_NELEM=4
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
@ -45,7 +45,6 @@ CONFIG_START_MONTH=3
|
|||
CONFIG_START_YEAR=2009
|
||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_UART0_BAUD=57600
|
||||
CONFIG_UART0_BITS=0
|
||||
CONFIG_UART0_RXBUFSIZE=32
|
||||
|
|
|
@ -45,7 +45,6 @@ CONFIG_START_MONTH=3
|
|||
CONFIG_START_YEAR=2009
|
||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TLS_NELEM=0
|
||||
CONFIG_UART0_BAUD=57600
|
||||
CONFIG_UART0_BITS=0
|
||||
CONFIG_UART0_RXBUFSIZE=32
|
||||
|
|
|
@ -90,9 +90,6 @@ extern "C"
|
|||
# else
|
||||
typedef uint8_t tls_ndxset_t;
|
||||
# endif
|
||||
|
||||
typedef CODE void (*tls_dtor_t)(FAR void *);
|
||||
|
||||
#endif
|
||||
|
||||
#if CONFIG_TLS_TASK_NELEM > 0
|
||||
|
@ -109,6 +106,8 @@ typedef CODE void (*tls_dtor_t)(FAR void *);
|
|||
# endif
|
||||
#endif
|
||||
|
||||
typedef CODE void (*tls_dtor_t)(FAR void *);
|
||||
|
||||
/* This structure encapsulates all variables associated with getopt(). */
|
||||
|
||||
struct getopt_s
|
||||
|
@ -225,7 +224,7 @@ struct tls_info_s
|
|||
#if CONFIG_TLS_TASK_NELEM > 0
|
||||
|
||||
/****************************************************************************
|
||||
* Name: task_tls_allocs
|
||||
* Name: task_tls_alloc
|
||||
*
|
||||
* Description:
|
||||
* Allocate a global-unique task local storage data index
|
||||
|
|
|
@ -44,7 +44,7 @@ config TLS_LOG2_MAXSTACK
|
|||
|
||||
config TLS_NELEM
|
||||
int "Number of TLS elements"
|
||||
default 4
|
||||
default 0
|
||||
range 0 64
|
||||
---help---
|
||||
The number of unique TLS elements. These can be accessed with
|
||||
|
|
Loading…
Reference in a new issue