xiaoxiang781216 edited a comment on pull request #3517:
URL: https://github.com/apache/incubator-nuttx/pull/3517#issuecomment-817309644


   > You might also look how TLS is implemented in Zephyr.
   
   I will took a look.
   
   > Much nicer than our implementation: 
https://docs.zephyrproject.org/latest/guides/thread_local_storage.html
   > 
   
   Zephyr implementation need toolchain support(```__thread``` keyword 
introduced by gcc 3.3.1 2003-08-04):
   
https://github.com/zephyrproject-rtos/zephyr/blame/3c79b565fe7e6afed3687d95dd3e70bb93699a88/doc/guides/thread_local_storage.rst#L10
   So, I think it's better to support both approach(explicit and implicit TLS) 
or we give up the old toolchain support.
   
   > This is good too: 
https://chao-tic.github.io/blog/2018/12/25/tls#tls-access-in-executables-and-shared-objects
   > 
   > I think if we want to re-architect TLS, we should do a better job.
   
   This patch try to move the most tls action from arch to sched/libc, which 
will simplify the implementation of the implicit TLS in the future.


-- 
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


Reply via email to