-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Use individual socket syscalls. #13272
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
f03a4c9
to
07ff216
Compare
07ff216
to
0a3c359
Compare
Remove the SYSCALL_USE_SOCKETCALL definition which was causing musl to use a single syscall for all socket calls (a mostly legacy linux convention apparently). This is much better for emscripten because it allows DCE and more precise dependencies.
0a3c359
to
b54a861
Compare
@juj could you take a look? I hope you will be in favor of this as its win for DCE-ability. |
#define __NR_sendmsg 370 | ||
#define __NR_recvfrom 371 | ||
#define __NR_recvmsg 372 | ||
#define __NR_shutdown 373 |
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.
Does musl establish this numbering, or do we? Will this stay in sync with musl?
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.
Oh nm, reading emscripten-core/musl@c2feda4 suggests these are well established.
It looks like this was a recent change to musl upstream, did we update musl already before to support this? (or do we not really need to do so to update?)
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.
IIUC the recent change to upstream musl was to avoid socketcall multiplexing on more architecutres, but I think the idea was that any architectures that support the split out syscalls shoudl already have been using them. (i.e. it was arguably a bug that they were using socketcall).
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.
Looks very good!
Also, remove stray `err` logging from #13272.
Remove the SYSCALL_USE_SOCKETCALL definition which was causing
musl to use a single syscall for all socket calls (a mostly legacy
linux convention apparently).
For a little background on this see:
emscripten-core/musl@c2feda4
This is much better for emscripten because it allows DCE and more
precise dependencies.
The changes to library_syscall.js are just re-arranging code, there should be no
functions changes here.