Skip to content

Add epoll headers and syscall stubs#27206

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
guybedford:epoll-headers
Jun 26, 2026
Merged

Add epoll headers and syscall stubs#27206
sbc100 merged 1 commit into
emscripten-core:mainfrom
guybedford:epoll-headers

Conversation

@guybedford

Copy link
Copy Markdown
Collaborator

This adds the epoll syscall surface (headers, libc wrappers, declarations and signatures) with no working implementation, so the boilerplate can land ahead of the host integration. Split out from #27201 so that the larger, more involved host implementation can be reviewed separately.

The syscalls are fully wired in but return -ENOSYS everywhere for now:

  • sys/epoll.h synced from upstream musl, and removed from the exclude list in update_musl.py
  • musl epoll.c wrappers compiled into libc (epoll_create/epoll_create1/epoll_ctl/epoll_wait/epoll_pwait)
  • SYS_epoll_* -> __syscall_epoll_* mappings, declarations in emscripten/syscalls.h, and libsigs.js signatures
  • legacy (non-WASMFS) JS __syscall_epoll_* return -ENOSYS
  • WASMFS __syscall_epoll_* return -ENOSYS, matching the existing socket stubs in syscalls.cpp
  • tools/native_sigs.py regenerated for the new libc functions

The actual readiness/wait-queue host integration (the working epoll) follows in a separate PR.

@sbc100 sbc100 enabled auto-merge (squash) June 26, 2026 19:45
Adds the epoll syscall surface without a working implementation, so the
boilerplate can land ahead of the host integration:

- sys/epoll.h synced from upstream musl, no longer excluded by
  update_musl.py
- musl epoll.c wrappers compiled into libc (epoll_create/epoll_create1/
  epoll_ctl/epoll_wait/epoll_pwait)
- SYS_epoll_* -> __syscall_epoll_* mappings, declarations and signatures
- legacy (non-WASMFS) JS syscalls return -ENOSYS
- WASMFS syscalls return -ENOSYS, matching the existing socket stubs

The actual readiness/wait-queue host integration follows in a separate
commit.
@sbc100 sbc100 merged commit a5bb2c6 into emscripten-core:main Jun 26, 2026
39 checks passed
@guybedford guybedford deleted the epoll-headers branch June 26, 2026 20:52
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

Successfully merging this pull request may close these issues.

2 participants