authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-04-30 11:00:27+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-04-30 11:00:27+03:00
log611bd8e9f49bd3532a23c49f6b675da03403b635
tree356a0606825d02520c14c9a99d80c2cea3e7112a
parent611a1436f022e777caf4eea8d1e6c81edc22a43f
parent07c1be80c2e656520d431287ff4af78823e19233
signature Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #5213 from tadeokondrak/evented-readv-fix

Fix std.event.Loop.readv

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

lib/std/event/loop.zig+12
......@@ -1080,6 +1080,9 @@ pub const Loop = struct {
10801080 .read => |*msg| {
10811081 msg.result = noasync os.read(msg.fd, msg.buf);
10821082 },
1083 .readv => |*msg| {
1084 msg.result = noasync os.readv(msg.fd, msg.iov);
1085 },
10831086 .write => |*msg| {
10841087 msg.result = noasync os.write(msg.fd, msg.bytes);
10851088 },
......@@ -1174,6 +1177,7 @@ pub const Loop = struct {
11741177
11751178 pub const Msg = union(enum) {
11761179 read: Read,
1180 readv: ReadV,
11771181 write: Write,
11781182 writev: WriteV,
11791183 pwritev: PWriteV,
......@@ -1195,6 +1199,14 @@ pub const Loop = struct {
11951199 pub const Error = os.ReadError;
11961200 };
11971201
1202 pub const ReadV = struct {
1203 fd: os.fd_t,
1204 iov: []const os.iovec,
1205 result: Error!usize,
1206
1207 pub const Error = os.ReadError;
1208 };
1209
11981210 pub const Write = struct {
11991211 fd: os.fd_t,
12001212 bytes: []const u8,