Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

implement thread_local! #30

Open
japaric opened this issue Jan 14, 2017 · 3 comments
Open

implement thread_local! #30

japaric opened this issue Jan 14, 2017 · 3 comments

Comments

@japaric
Copy link
Owner

japaric commented Jan 14, 2017

No description provided.

@FenrirWolf
Copy link
Contributor

FenrirWolf commented Feb 23, 2017

Would using the thread_local implementations from libstd/sys/redox be sufficient? As far as I can tell it's pure rust code with no system dependencies.

@tbu-
Copy link
Collaborator

tbu- commented Feb 23, 2017

This seems to rely entirely on the #[thread_local] attribute. What does it do? :)

@FenrirWolf
Copy link
Contributor

FenrirWolf commented Feb 23, 2017

It hooks into ELF thread_local storage, which can be toggled with "has-elf-tls": "true" in target specification files (see https://github.com/rust-lang/rust/blob/master/src/librustc_back/target/mod.rs#L376-L378L)

However, I'm not entirely sure what determines if a platform supports ELF TLS. I think it's actually set up during link-time when enabled.

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

No branches or pull requests

3 participants