casaroli commented on code in PR #20492: URL: https://github.com/apache/nuttx/pull/20492#discussion_r4304393802
########## 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: Done. ########## 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: Done. ########## 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: No. `LIBC_ELF` does not select `BINFMT_LOADABLE`: `mps3-an547:bl` has `CONFIG_LIBC_ELF=y` and no binary loader, and its `dlopen()` uses `ta_modules`. ########## 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: Done. ########## 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: It is not needed. `libelf_getsymbol()` no longer checks the registry, so the lock protected nothing. I removed the note and the lock in `dlsym()`; `dlsym()` is now the same as on master. -- 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]
