authorgravatar for me@tadeo.caTadeo Kondrak <me@tadeo.ca> 2020-05-05 05:19:17-06:00
committergravatar for me@tadeo.caTadeo Kondrak <me@tadeo.ca> 2020-05-05 05:55:27-06:00
logfdfdac493998a180eeffdcab66e579e7af250039
tree239aa11cced7ca37b35a07363ffc397177907f2e
parent2c9204032d1c839d8d577113a9c4def4b9ea9b94
signaturelock-open Commit is signed but in an unrecognized format.

update comments for nosuspend


3 files changed, 9 insertions(+), 9 deletions(-)

lib/std/dwarf.zig+6-6
...@@ -248,7 +248,7 @@ fn readUnitLength(in_stream: var, endian: builtin.Endian, is_64: *bool) !u64 {...@@ -248,7 +248,7 @@ fn readUnitLength(in_stream: var, endian: builtin.Endian, is_64: *bool) !u64 {
248 }248 }
249}249}
250250
251// TODO the noasyncs here are workarounds251// TODO the nosuspends here are workarounds
252fn readAllocBytes(allocator: *mem.Allocator, in_stream: var, size: usize) ![]u8 {252fn readAllocBytes(allocator: *mem.Allocator, in_stream: var, size: usize) ![]u8 {
253 const buf = try allocator.alloc(u8, size);253 const buf = try allocator.alloc(u8, size);
254 errdefer allocator.free(buf);254 errdefer allocator.free(buf);
...@@ -256,7 +256,7 @@ fn readAllocBytes(allocator: *mem.Allocator, in_stream: var, size: usize) ![]u8...@@ -256,7 +256,7 @@ fn readAllocBytes(allocator: *mem.Allocator, in_stream: var, size: usize) ![]u8
256 return buf;256 return buf;
257}257}
258258
259// TODO the noasyncs here are workarounds259// TODO the nosuspends here are workarounds
260fn readAddress(in_stream: var, endian: builtin.Endian, is_64: bool) !u64 {260fn readAddress(in_stream: var, endian: builtin.Endian, is_64: bool) !u64 {
261 return nosuspend if (is_64)261 return nosuspend if (is_64)
262 try in_stream.readInt(u64, endian)262 try in_stream.readInt(u64, endian)
...@@ -269,7 +269,7 @@ fn parseFormValueBlockLen(allocator: *mem.Allocator, in_stream: var, size: usize...@@ -269,7 +269,7 @@ fn parseFormValueBlockLen(allocator: *mem.Allocator, in_stream: var, size: usize
269 return FormValue{ .Block = buf };269 return FormValue{ .Block = buf };
270}270}
271271
272// TODO the noasyncs here are workarounds272// TODO the nosuspends here are workarounds
273fn parseFormValueBlock(allocator: *mem.Allocator, in_stream: var, endian: builtin.Endian, size: usize) !FormValue {273fn parseFormValueBlock(allocator: *mem.Allocator, in_stream: var, endian: builtin.Endian, size: usize) !FormValue {
274 const block_len = try nosuspend in_stream.readVarInt(usize, endian, size);274 const block_len = try nosuspend in_stream.readVarInt(usize, endian, size);
275 return parseFormValueBlockLen(allocator, in_stream, block_len);275 return parseFormValueBlockLen(allocator, in_stream, block_len);
...@@ -277,7 +277,7 @@ fn parseFormValueBlock(allocator: *mem.Allocator, in_stream: var, endian: builti...@@ -277,7 +277,7 @@ fn parseFormValueBlock(allocator: *mem.Allocator, in_stream: var, endian: builti
277277
278fn parseFormValueConstant(allocator: *mem.Allocator, in_stream: var, signed: bool, endian: builtin.Endian, comptime size: i32) !FormValue {278fn parseFormValueConstant(allocator: *mem.Allocator, in_stream: var, signed: bool, endian: builtin.Endian, comptime size: i32) !FormValue {
279 // TODO: Please forgive me, I've worked around zig not properly spilling some intermediate values here.279 // TODO: Please forgive me, I've worked around zig not properly spilling some intermediate values here.
280 // `noasync` should be removed from all the function calls once it is fixed.280 // `nosuspend` should be removed from all the function calls once it is fixed.
281 return FormValue{281 return FormValue{
282 .Const = Constant{282 .Const = Constant{
283 .signed = signed,283 .signed = signed,
...@@ -301,7 +301,7 @@ fn parseFormValueConstant(allocator: *mem.Allocator, in_stream: var, signed: boo...@@ -301,7 +301,7 @@ fn parseFormValueConstant(allocator: *mem.Allocator, in_stream: var, signed: boo
301 };301 };
302}302}
303303
304// TODO the noasyncs here are workarounds304// TODO the nosuspends here are workarounds
305fn parseFormValueRef(allocator: *mem.Allocator, in_stream: var, endian: builtin.Endian, size: i32) !FormValue {305fn parseFormValueRef(allocator: *mem.Allocator, in_stream: var, endian: builtin.Endian, size: i32) !FormValue {
306 return FormValue{306 return FormValue{
307 .Ref = switch (size) {307 .Ref = switch (size) {
...@@ -315,7 +315,7 @@ fn parseFormValueRef(allocator: *mem.Allocator, in_stream: var, endian: builtin....@@ -315,7 +315,7 @@ fn parseFormValueRef(allocator: *mem.Allocator, in_stream: var, endian: builtin.
315 };315 };
316}316}
317317
318// TODO the noasyncs here are workarounds318// TODO the nosuspends here are workarounds
319fn parseFormValue(allocator: *mem.Allocator, in_stream: var, form_id: u64, endian: builtin.Endian, is_64: bool) anyerror!FormValue {319fn parseFormValue(allocator: *mem.Allocator, in_stream: var, form_id: u64, endian: builtin.Endian, is_64: bool) anyerror!FormValue {
320 return switch (form_id) {320 return switch (form_id) {
321 FORM_addr => FormValue{ .Address = try readAddress(in_stream, endian, @sizeOf(usize) == 8) },321 FORM_addr => FormValue{ .Address = try readAddress(in_stream, endian, @sizeOf(usize) == 8) },
lib/std/event/batch.zig+1-1
...@@ -21,7 +21,7 @@ pub fn Batch(...@@ -21,7 +21,7 @@ pub fn Batch(
21 /// usual recommended option for this parameter.21 /// usual recommended option for this parameter.
22 auto_async,22 auto_async,
2323
24 /// Always uses the `noasync` keyword when using `await` on the jobs,24 /// Always uses the `nosuspend` keyword when using `await` on the jobs,
25 /// making `add` and `wait` non-async functions. Asserts that the jobs do not suspend.25 /// making `add` and `wait` non-async functions. Asserts that the jobs do not suspend.
26 never_async,26 never_async,
2727
lib/std/fs/file.zig+2-2
...@@ -66,7 +66,7 @@ pub const File = struct {...@@ -66,7 +66,7 @@ pub const File = struct {
66 lock_nonblocking: bool = false,66 lock_nonblocking: bool = false,
6767
68 /// Setting this to `.blocking` prevents `O_NONBLOCK` from being passed even68 /// Setting this to `.blocking` prevents `O_NONBLOCK` from being passed even
69 /// if `std.io.is_async`. It allows the use of `noasync` when calling functions69 /// if `std.io.is_async`. It allows the use of `nosuspend` when calling functions
70 /// related to opening the file, reading, writing, and locking.70 /// related to opening the file, reading, writing, and locking.
71 intended_io_mode: io.ModeOverride = io.default_mode,71 intended_io_mode: io.ModeOverride = io.default_mode,
72 };72 };
...@@ -112,7 +112,7 @@ pub const File = struct {...@@ -112,7 +112,7 @@ pub const File = struct {
112 mode: Mode = default_mode,112 mode: Mode = default_mode,
113113
114 /// Setting this to `.blocking` prevents `O_NONBLOCK` from being passed even114 /// Setting this to `.blocking` prevents `O_NONBLOCK` from being passed even
115 /// if `std.io.is_async`. It allows the use of `noasync` when calling functions115 /// if `std.io.is_async`. It allows the use of `nosuspend` when calling functions
116 /// related to opening the file, reading, writing, and locking.116 /// related to opening the file, reading, writing, and locking.
117 intended_io_mode: io.ModeOverride = io.default_mode,117 intended_io_mode: io.ModeOverride = io.default_mode,
118 };118 };