Skip to content

Use musl implementation of pthread API where possible  #15061

Closed

Description

@sbc100

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

Activity

  1. kleisauke commented on Dec 9, 2021

    @kleisauke
    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).

  2. sbc100 commented on Jun 27, 2024

    @sbc100
    CollaboratorAuthor

    I think this is largely done now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions