testing/ostest: Replace up_tls_info with tls_get_info

follow the kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-05-27 10:06:17 +08:00 committed by Petro Karashchenko
parent 871c59dc31
commit 26367a66db

View File

@ -29,13 +29,18 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <nuttx/arch.h>
#include <nuttx/tls.h> #include <nuttx/tls.h>
#include "ostest.h" #include "ostest.h"
#if CONFIG_TLS_NELEM > 0 #if CONFIG_TLS_NELEM > 0
/****************************************************************************
* Preprocessor Definitions
****************************************************************************/
#define copy_tls_info(a, b) memcpy(a, b, sizeof(struct tls_info_s))
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
@ -48,17 +53,17 @@ static struct tls_info_s g_save_info;
static void get_tls_info(FAR struct tls_info_s *info) static void get_tls_info(FAR struct tls_info_s *info)
{ {
memcpy(info, up_tls_info(), sizeof(struct tls_info_s)); copy_tls_info(info, tls_get_info());
} }
static void put_tls_info(FAR const struct tls_info_s *info) static void put_tls_info(FAR const struct tls_info_s *info)
{ {
memcpy(up_tls_info(), info, sizeof(struct tls_info_s)); copy_tls_info(tls_get_info(), info);
} }
static void set_tls_info(uintptr_t value) static void set_tls_info(uintptr_t value)
{ {
FAR struct tls_info_s *info = up_tls_info(); FAR struct tls_info_s *info = tls_get_info();
int i; int i;
for (i = 0; i < CONFIG_TLS_NELEM; i++) for (i = 0; i < CONFIG_TLS_NELEM; i++)
@ -69,7 +74,7 @@ static void set_tls_info(uintptr_t value)
static bool verify_tls_info(uintptr_t value) static bool verify_tls_info(uintptr_t value)
{ {
FAR struct tls_info_s *info = up_tls_info(); FAR struct tls_info_s *info = tls_get_info();
bool fail = false; bool fail = false;
int i; int i;