From d69dc04d9610f33ec2324d99a40a61daab293e3d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 10 Mar 2016 18:10:44 -0600 Subject: [PATCH] TLS: Fix an error in a macro --- arch | 2 +- include/nuttx/arch.h | 2 +- include/nuttx/tls.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch b/arch index 0d8d0f4ead5..7195b24346e 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 0d8d0f4ead50917143cddbc140ca6658664d6737 +Subproject commit 7195b24346e9d4115feff64d09f406ef31966630 diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 28d219c368e..448029f47e0 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -1663,7 +1663,7 @@ int up_timer_start(FAR const struct timespec *ts); * * Returned Value: * A pointer to TLS info structure at the beginning of the STACK memory - * allocation. This is essentially an appliction of the TLS_INFO(sp) + * allocation. This is essentially an application of the TLS_INFO(sp) * macro and has a platform dependency only in the manner in which the * stack pointer (sp) is obtained and interpreted. * diff --git a/include/nuttx/tls.h b/include/nuttx/tls.h index b667bde786a..e3477aada18 100644 --- a/include/nuttx/tls.h +++ b/include/nuttx/tls.h @@ -60,7 +60,7 @@ #define TLS_STACK_ALIGN (1L << CONFIG_TLS_LOG2_MAXSTACK) #define TLS_STACK_MASK (TLS_STACK_ALIGN - 1) #define TLS_MAXSTACK (TLS_STACK_ALIGN) -#define TLS_INFO(sp) ((FAR struct tls_info_s *)((sp) & TLS_STACK_MASK)) +#define TLS_INFO(sp) ((FAR struct tls_info_s *)((sp) & ~TLS_STACK_MASK)) /**************************************************************************** * Public Types