rust-lang / rust-lang/libc

Support pthread scheduling functions for WASM

Open
#2,754 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-API-request E-hard
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

According to emscripten, the pthread is supported.
I quickly went through the documentation and found many things out of it implemented but also a few things which aren't there, for example:

  • pthread_setschedparam
  • pthread_getschedparam

And a few others.

Is there any reason those aren't added? Maybe these, in particular, aren't supported for wasm and emscripten? Can I add those if those are supported?
P.S. Asking mainly due to the support of wasm has been asked for in the thread-priority crate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked wasm32-unknown-emscripten libc documentation and verify whether pthread_setschedparam and pthread_getschedparam are supported by Emscripten. Done means adding bindings for the supported scheduling functions and clearly excluding any functions the platform does not provide.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.