Skip to content

Use musl implementation of pthread API where possible #15061

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

Closed
sbc100 opened this issue Sep 16, 2021 · 2 comments
Closed

Use musl implementation of pthread API where possible #15061

sbc100 opened this issue Sep 16, 2021 · 2 comments

Comments

@sbc100
Copy link
Collaborator

sbc100 commented Sep 16, 2021

Historically a lot of the pthread implementation in emscripten was custom JS code.

We have been slowly moving towards using the musl C code where possible and there is
still some work to do here. Doing this has several advantages:

  • More portable / self-contained wasm modules (fewer JS imports)
  • Better internal compatibility with the rest of musl
  • Fewer emscripten-specific bugs
  • Less code to maintain

Even when we can't use the musl code directly, moving the code to C is from JS
has its advantages too.

Some of the work already done: #12861 #14858 #14853 #14775 #14707 #14484 #12839 #12615

@kleisauke
Copy link
Collaborator

PR #15603 and #15604 are also relevant here. After that, most pthread APIs have been moved to musl (I think).

Another advantage of doing this is that simplifying library_pthread.js becomes easier (see e.g. work-in-progress commit bf592e8).

@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 27, 2024

I think this is largely done now!

@sbc100 sbc100 closed this as completed Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants