[Memory64] pthread libc changes for 64-bit - #15229
Merged
Merged
Conversation
sbc100
approved these changes
Oct 5, 2021
| case EM_PROXIED_JS_FUNCTION: | ||
| q->returnValue.d = | ||
| emscripten_receive_on_main_thread_js((int)q->functionPtr, q->args[0].i, &q->args[1].d); | ||
| emscripten_receive_on_main_thread_js((int)(size_t)q->functionPtr, q->args[0].i, &q->args[1].d); |
Collaborator
There was a problem hiding this comment.
intptr_t there to avoid the double cast?
Collaborator
Author
There was a problem hiding this comment.
On 64-bit, intptr_t would cast from 64 to 64, so would still need a secondary cast?
kripken
reviewed
Oct 5, 2021
| volatile int __vi[10]; | ||
| unsigned __s[10]; | ||
| } __u; | ||
| #ifdef __EMSCRIPTEN__ |
Collaborator
Author
There was a problem hiding this comment.
the 11 field is the pointer below.
|
|
||
| #if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) | ||
| typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; | ||
| typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t; |
Member
There was a problem hiding this comment.
Why the new constants 14 and 7? I can't see how doubling a pointer size leads to such things, so I'm missing something...
Collaborator
Author
There was a problem hiding this comment.
No idea, this is from upstream: https://git.musl-libc.org/cgit/musl/tree/include/alltypes.h.in
Collaborator
Author
|
This now contains a small JS change from #15222 because they can't work independently |
aardappel
enabled auto-merge (squash)
October 7, 2021 21:47
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.
No description provided.