aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorStephen Gregoratto <dev@sgregoratto.me>2024-03-12 21:13:13 +1100
committerStephen Gregoratto <dev@sgregoratto.me>2024-03-16 23:37:50 +1100
commit9532f729371d8142fb65c61794b7bd765cd82396 (patch)
tree5097f26a389fddaab9a63e0a2c68e17034cb7f22 /lib/std/Thread.zig
parentdbb11915bd03992ff9b64cd7f373faa428f0cedf (diff)
downloadzig-9532f729371d8142fb65c61794b7bd765cd82396.tar.gz
zig-9532f729371d8142fb65c61794b7bd765cd82396.zip
Windows: Replace CreatePipe with ntdll implementation
This implementation is now a direct replacement for the `kernel32` one. New bitflags for named pipes and other generic ones were added based on browsing the ReactOS sources. `UNICODE_STRING.Buffer` has also been changed to be nullable, as this is what makes the implementation work. This required some changes to places accesssing the buffer after a `SUCCESS`ful return, most notably `QueryObjectName` which even referred to it being nullable.
Diffstat (limited to 'lib/std/Thread.zig')
-rw-r--r--lib/std/Thread.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index 574e573c13..e895183331 100644
--- a/lib/std/Thread.zig
+++ b/lib/std/Thread.zig
@@ -208,7 +208,7 @@ pub fn getName(self: Thread, buffer_ptr: *[max_name_len:0]u8) GetNameError!?[]co
)) {
.SUCCESS => {
const string = @as(*const os.windows.UNICODE_STRING, @ptrCast(&buf));
- const len = std.unicode.wtf16LeToWtf8(buffer, string.Buffer[0 .. string.Length / 2]);
+ const len = std.unicode.wtf16LeToWtf8(buffer, string.Buffer.?[0 .. string.Length / 2]);
return if (len > 0) buffer[0..len] else null;
},
.NOT_IMPLEMENTED => return error.Unsupported,