mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 18:37:46 +08:00
libc/tls: Make tls_get_info as the pulibc function instead up_tls_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
33a6aa2f48
commit
3e32b605fe
@@ -85,7 +85,6 @@
|
||||
#include <nuttx/compiler.h>
|
||||
#include <nuttx/cache.h>
|
||||
#include <nuttx/sched.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor definitions
|
||||
@@ -1826,14 +1825,6 @@ int up_timer_start(FAR const struct timespec *ts);
|
||||
* implementation provided here assume the arch has a "push down" stack.
|
||||
*/
|
||||
|
||||
#ifndef up_tls_info
|
||||
# if defined(CONFIG_TLS_ALIGNED) && !defined(__KERNEL__)
|
||||
# define up_tls_info() TLS_INFO((uintptr_t)up_getsp())
|
||||
# else
|
||||
# define up_tls_info() tls_get_info()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_tls_size
|
||||
*
|
||||
|
||||
@@ -184,6 +184,7 @@ void nx_pthread_exit(FAR void *exit_value) noreturn_function;
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_PTHREAD_CLEANUP
|
||||
struct tls_info_s;
|
||||
void pthread_cleanup_popall(FAR struct tls_info_s *tls);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,18 +33,16 @@
|
||||
#include <sched.h>
|
||||
#include <signal.h>
|
||||
#include <semaphore.h>
|
||||
#include <pthread.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <nuttx/wdog.h>
|
||||
#include <nuttx/mm/shm.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/net/net.h>
|
||||
|
||||
#include <arch/arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@@ -393,6 +391,8 @@ struct stackinfo_s
|
||||
* the struct task_group_s is free.
|
||||
*/
|
||||
|
||||
struct task_info_s;
|
||||
|
||||
#ifndef CONFIG_DISABLE_PTHREAD
|
||||
struct join_s; /* Forward reference */
|
||||
/* Defined in sched/pthread/pthread.h */
|
||||
|
||||
+6
-1
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/atexit.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -301,7 +302,11 @@ uintptr_t task_tls_get_value(int tlsindex);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_TLS_ALIGNED) || defined(__KERNEL__)
|
||||
#if defined(up_tls_info)
|
||||
# define tls_get_info() up_tls_info()
|
||||
#elif defined(CONFIG_TLS_ALIGNED)
|
||||
# define tls_get_info() TLS_INFO(up_getsp())
|
||||
#else
|
||||
FAR struct tls_info_s *tls_get_info(void);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user