v01d commented on pull request #3170: URL: https://github.com/apache/incubator-nuttx/pull/3170#issuecomment-806100905
This looks OK in general to me. I have only two concerns: - what if `_getoptvars` is called simultaneously due to two tasks calling getopt() at the same time? maybe this should be protected by a mutex? - can we explicitly reserve space for this TLS data? if we continue to use this procedure (or the user requests too much TLS data) pthread_key_create will fail which leads to hard-to-debug problems. Having to guess the right size of `CONFIG_TLS_NELEM` is quite cumbersome. I think that we could have the array be CONFIG_TLS_NELEM + TLS_NELEM_RESERVED to guarantee this never fails. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
