ivmai / bdwgc

The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)
https://www.hboehm.info/gc/
Other
2.83k stars 395 forks source link

Upstream TLS support #622

Open jacob-hughes opened 2 months ago

jacob-hughes commented 2 months ago

I noticed that you were interested in potentially upstreaming some changes I made in my own fork of BDWGC which enables compiler generated (i.e. non-POSIX) TLS support. This stuff is obviously highly non-portable and I doubt that it would work on anything other than x86_64 Linux. If that's ok with you, I'd be happy to tidy it up, ifdef it behind some build flags, and submit a PR?

Thanks!

ivmai commented 2 months ago

I think it is OK to add support just for linux x86_64, anyway there are many tls variants supported in bdwgc. Somewhere in bdwgc readme it is written that scanning pointers in tls is in todo list...

In low priority. Guarded with ifdef. No need to modify build scripts, just document the macro in README.macros.

ivmai commented 2 months ago

Probably Rust users might need it