Don't use _Thread_local in run-test262.c#667
Merged
bnoordhuis merged 2 commits intoquickjs-ng:masterfrom Nov 9, 2024
Merged
Conversation
JS_SetRuntimeOpaque() and JS_GetRuntimeOpaque() are intended for embedders. Stop using them in quickjs-libc.c
bnoordhuis
commented
Nov 9, 2024
Comment on lines
+184
to
+192
| static JSThreadState *js_get_thread_state(JSRuntime *rt) | ||
| { | ||
| return (JSThreadState *)js_std_cmd(/*GetOpaque*/0, rt); | ||
| } | ||
|
|
||
| static void js_set_thread_state(JSRuntime *rt, JSThreadState *ts) | ||
| { | ||
| js_std_cmd(/*SetOpaque*/1, rt, ts); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
The other approach is a mutex-protected list or hash table but this seemed all around easier.
Contributor
Author
|
gcc48 failure is ancient cmake 🤦 |
Allows building with tcc and old gcc versions again.
e574e6c to
ca4c989
Compare
saghul
approved these changes
Nov 9, 2024
Contributor
Author
|
Yeah, I've seen that one. run-test262 in fact uses it so that wouldn't have worked. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows building with tcc and old gcc versions again.
Please heed the first commit where I unscrupulously add a backdoor so I can use JS_SetRuntimeOpaque in run-test262.c