Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS is disabled but a simple test shows that it works #22

Open
3246251196 opened this issue Dec 31, 2024 · 1 comment
Open

TLS is disabled but a simple test shows that it works #22

3246251196 opened this issue Dec 31, 2024 · 1 comment

Comments

@3246251196
Copy link
Member

3246251196 commented Dec 31, 2024

When we build our compilers, we use --disable-tls, but the test in: https://github.com/3246251196/adtools_testing/tree/main/tests/22_ThreadLocalStorage shows that - at least for that example - it works.

Investigate this.

@afxgroup Pinging.

===

One thing I have noticed is the massive increase in time taken when a variable is allocated with __thread - compared to when it is not. This can be seen by running the test program versus when that variable is not per thread. This happens with both newlib and clib4. The example does iterate 1 billion times, so there is no doubt a lot of overhead of extra instructions etc. It is quite a contrived example.

@afxgroup
Copy link

IIRC TLS should be implemented on kernel side like MOS devs did. However if we can enable it we can find a way to optimize it in our clib4 at least

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants