-
Notifications
You must be signed in to change notification settings - Fork 8k
TSRM: Replace TSRM_TLS
by C11’s thread_local
#20062
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
base: master
Are you sure you want to change the base?
Conversation
84a8c08
to
6569bca
Compare
Appears to be blocked on #20064. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This duplicates some code regarding the includes, so I don't particularly like this. Imo it adds more complexity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't do this. I would prefer to keep TSRM as an abstraction layer.
6569bca
to
eb2ed11
Compare
@nielsdos The duplication arises from the TLS testing files that Arnaud added for static OPcache. Other than that the change remains localized to TSRM. @dstogov TSRM still remains an abstraction layer for most of the thread-safety support. But it seems useful to me to rely on standardized functionality where possible. A good think that this PR pointed out: We were apparently not yet building with C11 on Windows. It makes sense to me to ship that independently. Unfortunately my attempt to change that failed, due to ext/intl which needs C++. I'm not seeing how to easily add the |
Generally, it might be sensible to distinguish between C and C++ code for Windows/MSVC (like we do on POSIX platforms). Currently, our build system is totally agnostic to that; everything is passed to MSVC, and the compiler decides whether it is C or C++ (based on the file extension), and there is only one set of flags ( That said, I don't think this will help in this case. If ext-intl (or any other C++ extension) would be build for ZTS, the build would fail, since we can't have C11 atomics in C++ code to my knowledge. Why not stick with |
No description provided.