]> Cypherpunks repositories - gostls13.git/commit
syscall: implement wasip1 SetNonblock and IsNonblock
authorChris O'Hara <cohara87@gmail.com>
Mon, 8 May 2023 07:06:08 +0000 (17:06 +1000)
committerGopher Robot <gobot@golang.org>
Thu, 11 May 2023 23:29:04 +0000 (23:29 +0000)
commit41893389a6fb6d4d8b181cd90ca58d9d65326f76
treef9636c4a2e3f1bfedbb60c413f6d6658bbbf4030
parent70247126415246c7716ec4d28d6bc1f4077aee1f
syscall: implement wasip1 SetNonblock and IsNonblock

Allows for the NONBLOCK file descriptor flag to be set and queried
on wasip1.

syscall.SetNonblock uses the fd_fdstat_set_flags WASI system call
and unix.IsNonblock uses the fd_fdstat_get system call.

This is a prerequisite for non-blocking I/O support.

Change-Id: I2bf79fd57142b2ec53eed3977d9aac8c6337eb80
Reviewed-on: https://go-review.googlesource.com/c/go/+/493356
Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Julien Fabre <ju.pryz@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Achille Roussel <achille.roussel@gmail.com>
src/internal/syscall/unix/nonblocking_wasip1.go
src/syscall/fs_wasip1.go
src/syscall/net_wasip1.go
src/syscall/syscall_wasip1.go