On 12-10-23 09:14 AM, David Rajchenbach-Teller wrote:
> Couldn't |missing_file| itself be the TLS key?
Probably. I believe it wasn't done that way for two reasons:
- Data addresses can be recycled by accident, due to stack/heap
reuse. Code segment addresses are Really Unique at load time.
- TLS needs function pointers anyways to have cleanups associated
with TLS entries when tasks die.
It might be possible to merge these a bit more (there are unfortunate
linkage complications with PLTs anyways) but in general I expect to hide
whatever boilerplate there is behind an item macro like:
condition! missing_file(&Path) -> Reader;
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev