mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Revert "tls: Move pthread key destructor to libc"
This reverts commit cc514d7791.
* It introduced a regression.
https://github.com/apache/incubator-nuttx/issues/3868
* It seems conceptually wrong to have per-process data in
the main thread's stack.
This commit is contained in:
committed by
Xiang Xiao
parent
8079d9fac3
commit
b3e8535ad6
@@ -530,6 +530,14 @@ struct task_group_s
|
||||
FAR struct join_s *tg_jointail; /* Tail of a list of join data */
|
||||
#endif
|
||||
|
||||
/* Thread local storage ***************************************************/
|
||||
|
||||
#if CONFIG_TLS_NELEM > 0
|
||||
tls_ndxset_t tg_tlsset; /* Set of TLS indexes allocated */
|
||||
|
||||
tls_dtor_t tg_tlsdestr[CONFIG_TLS_NELEM]; /* List of TLS destructors */
|
||||
#endif
|
||||
|
||||
/* POSIX Signal Control Fields ********************************************/
|
||||
|
||||
sq_queue_t tg_sigactionq; /* List of actions for signals */
|
||||
|
||||
@@ -118,13 +118,6 @@ struct task_info_s
|
||||
struct tls_info_s ta_tls; /* Must be first field */
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
struct getopt_s ta_getopt; /* Globals used by getopt() */
|
||||
#endif
|
||||
/* Thread local storage ***************************************************/
|
||||
|
||||
#if CONFIG_TLS_NELEM > 0
|
||||
sem_t ta_tlssem;
|
||||
tls_ndxset_t ta_tlsset; /* Set of TLS index allocated */
|
||||
tls_dtor_t ta_tlsdtor[CONFIG_TLS_NELEM]; /* List of TLS destructors */
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -327,20 +320,4 @@ void tls_destruct(void);
|
||||
|
||||
FAR struct task_info_s *task_get_info(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: task_setup_info
|
||||
*
|
||||
* Description:
|
||||
* Setup task_info_s for task
|
||||
*
|
||||
* Input Parameters:
|
||||
* info - New created task_info_s
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; ERROR on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int task_setup_info(FAR struct task_info_s *info);
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_TLS_H */
|
||||
|
||||
@@ -294,6 +294,14 @@ SYSCALL_LOOKUP(telldir, 1)
|
||||
SYSCALL_LOOKUP(shmdt, 1)
|
||||
#endif
|
||||
|
||||
#if CONFIG_TLS_NELEM > 0
|
||||
SYSCALL_LOOKUP(tls_alloc, 0)
|
||||
SYSCALL_LOOKUP(tls_free, 1)
|
||||
SYSCALL_LOOKUP(tls_get_set, 1)
|
||||
SYSCALL_LOOKUP(tls_get_dtor, 1)
|
||||
SYSCALL_LOOKUP(tls_set_dtor, 2)
|
||||
#endif
|
||||
|
||||
/* The following are defined if pthreads are enabled */
|
||||
|
||||
#ifndef CONFIG_DISABLE_PTHREAD
|
||||
|
||||
Reference in New Issue
Block a user