xiaoxiang781216 commented on code in PR #20492:
URL: https://github.com/apache/nuttx/pull/20492#discussion_r4304201390


##########
include/nuttx/tls.h:
##########
@@ -43,10 +43,15 @@
 #include <nuttx/mutex.h>
 #include <nuttx/queue.h>
 
-#ifdef CONFIG_PTHREAD_ATFORK
+#if defined(CONFIG_PTHREAD_ATFORK) || defined(CONFIG_LIBC_ELF) || \
+    defined(CONFIG_BINFMT_LOADABLE)
 #  include <nuttx/list.h>
 #endif
 
+#if defined(CONFIG_LIBC_ELF) || defined(CONFIG_BINFMT_LOADABLE)
+#  include <errno.h>

Review Comment:
   ditto



##########
libs/libc/elf/elf_getsymbol.c:
##########
@@ -48,9 +48,10 @@
  *   called.
  *
  * Input Parameters:
- *   handle - The opaque, non-NULL value returned by a previous successful
- *            call to libelf_insert().
- *   name   - A pointer to the symbol name string.
+ *   registry - The registry the module is on.

Review Comment:
   revert



##########
include/nuttx/tls.h:
##########
@@ -173,6 +178,10 @@ struct task_info_s
   size_t                ta_envpc;   /* Maximum entries of environment array */
   size_t                ta_envc;    /* Number of environment strings        */
 #endif
+#if defined(CONFIG_LIBC_ELF) || defined(CONFIG_BINFMT_LOADABLE)

Review Comment:
   is it enough to check CONFIG_BINFMT_LOADABLE



##########
include/nuttx/tls.h:
##########
@@ -43,10 +43,15 @@
 #include <nuttx/mutex.h>
 #include <nuttx/queue.h>
 
-#ifdef CONFIG_PTHREAD_ATFORK
+#if defined(CONFIG_PTHREAD_ATFORK) || defined(CONFIG_LIBC_ELF) || \
+    defined(CONFIG_BINFMT_LOADABLE)
 #  include <nuttx/list.h>

Review Comment:
   let's include always



##########
libs/libc/elf/elf_getsymbol.c:
##########
@@ -62,41 +63,30 @@
  *   NOTE: This means that the address zero can never be a valid return
  *   value.
  *
+ * Assumptions:
+ *   The caller holds the lock of the registry.

Review Comment:
   why need



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to