authorgravatar for semarie@online.frSébastien Marie <semarie@online.fr> 2020-12-31 08:00:07+00:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-01 20:05:19-08:00
loga9c75a2b48f202d5c55097877499942ed07cc2e8
tree4295fc1d5bd38301e83fe790773e926c94d7bf19
parentca0b03f7b5a38a497d9f8ee20b3b31e47e007616

openbsd: add pollfd interface


1 files changed, 20 insertions(+), 0 deletions(-)

lib/std/os/bits/openbsd.zig+20
......@@ -1209,3 +1209,23 @@ pub const rlimit = extern struct {
12091209pub const SHUT_RD = 0;
12101210pub const SHUT_WR = 1;
12111211pub const SHUT_RDWR = 2;
1212
1213pub const nfds_t = c_uint;
1214
1215pub const pollfd = extern struct {
1216 fd: fd_t,
1217 events: c_short,
1218 revents: c_short,
1219};
1220
1221pub const POLLIN = 0x0001;
1222pub const POLLPRI = 0x0002;
1223pub const POLLOUT = 0x0004;
1224pub const POLLERR = 0x0008;
1225pub const POLLHUP = 0x0010;
1226pub const POLLNVAL = 0x0020;
1227pub const POLLRDNORM = 0x0040;
1228pub const POLLNORM = POLLRDNORM;
1229pub const POLLWRNORM = POLLOUT;
1230pub const POLLRDBAND = 0x0080;
1231pub const POLLWRBAND = 0x0100;