patacongo commented on pull request #2326: URL: https://github.com/apache/incubator-nuttx/pull/2326#issuecomment-731261177
An issue with using TLS is that the variables would be duplicated for each thread. That would be required for true thread safety, but in reality only one instance of the variables are needed per task group (just as there are only one instance of the getopt() variables per process under Linux). That is because getopt() is normally only used from main() using the argc and argv inputs. An option would be to put the getopt() variables in struct task_tcb_s or, better, struct group_s. ---------------------------------------------------------------- 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: us...@infra.apache.org