-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Memory64] pthread libc changes for 64-bit #15229
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
Conversation
@@ -164,7 +161,7 @@ static void _do_call(em_queued_call* q) { | |||
break; | |||
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); |
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.
intptr_t
there to avoid the double cast?
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.
On 64-bit, intptr_t
would cast from 64 to 64, so would still need a secondary cast?
int __i[10]; | ||
volatile int __vi[10]; | ||
unsigned __s[10]; | ||
} __u; | ||
#ifdef __EMSCRIPTEN__ |
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.
Why does the 11 change to 10?
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.
the 11 field is the pointer below.
@@ -114,7 +119,7 @@ typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __ | |||
#endif | |||
|
|||
#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; |
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.
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...
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.
No idea, this is from upstream: https://git.musl-libc.org/cgit/musl/tree/include/alltypes.h.in
This now contains a small JS change from #15222 because they can't work independently |
7bab09c
to
b1830cd
Compare
No description provided.