]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: implement wasip1 netpoll
authorChris O'Hara <cohara87@gmail.com>
Mon, 8 May 2023 07:07:18 +0000 (17:07 +1000)
committerGopher Robot <gobot@golang.org>
Thu, 25 May 2023 00:12:40 +0000 (00:12 +0000)
commitc5c2184538411c8cf7abc4e536fbe7af8b0307f5
tree8cf138711de09b7d23c1a489482cdd7773af5858
parent04c628935d1487632f903e4e0688fb7a34063752
runtime: implement wasip1 netpoll

Implements netpoll using WASI's poll_oneoff system call.

This enables non-blocking I/O support for wasip1.

Change-Id: Ie395fa49d651c8b8262d485e2847dd65b0a10bc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/493357
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Julien Fabre <ju.pryz@gmail.com>
Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
12 files changed:
misc/wasm/go_wasip1_wasm_exec
src/cmd/dist/test.go
src/internal/poll/errno_unix.go
src/internal/poll/fd_poll_js.go [moved from src/internal/poll/fd_poll_wasm.go with 98% similarity]
src/internal/poll/fd_poll_runtime.go
src/runtime/internal/wasitest/host_test.go [new file with mode: 0644]
src/runtime/internal/wasitest/nonblock_test.go [new file with mode: 0644]
src/runtime/internal/wasitest/testdata/nonblock.go [new file with mode: 0644]
src/runtime/netpoll.go
src/runtime/netpoll_fake.go
src/runtime/netpoll_wasip1.go [new file with mode: 0644]
src/runtime/os_wasip1.go