You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/12/05 17:18:27 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4941: arch: Remove the duplicated up_tls_info implementation

gustavonihei commented on a change in pull request #4941:
URL: https://github.com/apache/incubator-nuttx/pull/4941#discussion_r762591082



##########
File path: include/nuttx/arch.h
##########
@@ -1791,10 +1791,18 @@ int up_timer_start(FAR const struct timespec *ts);
 /* struct tls_info_s;
  * FAR struct tls_info_s *up_tls_info(void);
  *
- * The actual declaration or definition is provided in arch/tls.h.  The
- * actual implementation may be a MACRO or an inline function.
+ * The actual definition is provided in arch/arch.h as a macro. The default
+ * implementation provided here assume the arch has a "push down" stack.
  */
 
+#ifndef up_tls_info
+#  ifdef CONFIG_TLS_ALIGNED
+#    define up_tls_info() TLS_INFO((uintptr_t)up_getsp())
+#  else
+#   define up_tls_info() tls_get_info()

Review comment:
       ```suggestion
   #    define up_tls_info() tls_get_info()
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org