github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/fsapi/poll.go (about) 1 package fsapi 2 3 // Pflag are bit flags used for File.Poll. Values, including zero, should not 4 // be interpreted numerically. Instead, use by constants prefixed with 'POLL'. 5 // 6 // # Notes 7 // 8 // - This is like `pollfd.events` flags for `poll` in POSIX. See 9 // https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html 10 type Pflag uint32 11 12 // Only define bitflags we support and are needed by `poll_oneoff` in wasip1 13 // See https://github.com/WebAssembly/WASI/blob/snapshot-01/phases/snapshot/docs.md#eventrwflags 14 const ( 15 // POLLIN is a read event. 16 POLLIN Pflag = 1 << iota 17 18 // POLLOUT is a write event. 19 POLLOUT 20 )