authorgravatar for me@tadeo.caTadeo Kondrak <me@tadeo.ca> 2020-04-29 04:33:05-06:00
committergravatar for me@tadeo.caTadeo Kondrak <me@tadeo.ca> 2020-04-29 04:33:29-06:00
log07c1be80c2e656520d431287ff4af78823e19233
treeb6a3669665d940596fc91782fd64540ce879fa15
parent5929e5ca0ebde636dd69d52d648df8cff59e6d96
signature Commit is signed but in an unrecognized format.

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 {...@@ -1080,6 +1080,9 @@ pub const Loop = struct {
1080 .read => |*msg| {1080 .read => |*msg| {
1081 msg.result = noasync os.read(msg.fd, msg.buf);1081 msg.result = noasync os.read(msg.fd, msg.buf);
1082 },1082 },
1083 .readv => |*msg| {
1084 msg.result = noasync os.readv(msg.fd, msg.iov);
1085 },
1083 .write => |*msg| {1086 .write => |*msg| {
1084 msg.result = noasync os.write(msg.fd, msg.bytes);1087 msg.result = noasync os.write(msg.fd, msg.bytes);
1085 },1088 },
...@@ -1174,6 +1177,7 @@ pub const Loop = struct {...@@ -1174,6 +1177,7 @@ pub const Loop = struct {
11741177
1175 pub const Msg = union(enum) {1178 pub const Msg = union(enum) {
1176 read: Read,1179 read: Read,
1180 readv: ReadV,
1177 write: Write,1181 write: Write,
1178 writev: WriteV,1182 writev: WriteV,
1179 pwritev: PWriteV,1183 pwritev: PWriteV,
...@@ -1195,6 +1199,14 @@ pub const Loop = struct {...@@ -1195,6 +1199,14 @@ pub const Loop = struct {
1195 pub const Error = os.ReadError;1199 pub const Error = os.ReadError;
1196 };1200 };
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
1198 pub const Write = struct {1210 pub const Write = struct {
1199 fd: os.fd_t,1211 fd: os.fd_t,
1200 bytes: []const u8,1212 bytes: []const u8,