WebAssembly / WebAssembly/threads

i64.atomic.wait has no matching futex syscall on Linux

Open
#135 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
767
Forks
54
PR merge metrics
No merged PRs in 30d

Description

I noticed that the i64.atomic.wait instruction can't be translated directly to the futex syscall on Linux, since Linux only supports 32-bit futex operations. I'm concerned that non-web embeddings on Linux will need to implement their own wait/notify functionality instead of being able to use Linux's directly.

Web embeddings will have to implement their own wait/notify functionality anyway to support primitives like Atomics.waitAsync

Related:
#7
StackOverflow: Linux futex for 64-bits

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 by reading the discussion on this issue and related issue #7, then compare the i64.atomic.wait requirements with Linux's 32-bit futex limitation. Done means reaching an agreed direction for how non-web and web embeddings should provide wait/notify functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, wasm
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.