diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-14 19:39:12 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-14 19:39:12 +0100 |
| commit | ebbc33fdb5e044e5feb010d6d3a8bde41f71a05f (patch) | |
| tree | 29ccc30a22ef8082df00eb3f2dbcfb9ee73e789f /core/os/os2/pipe_windows.odin | |
| parent | 3a4373641b68019149007f04a201965ee961f74e (diff) | |
Mockup of the new `package os` interface (incomplete and non-functioning)
Diffstat (limited to 'core/os/os2/pipe_windows.odin')
| -rw-r--r-- | core/os/os2/pipe_windows.odin | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/os/os2/pipe_windows.odin b/core/os/os2/pipe_windows.odin new file mode 100644 index 000000000..68adb6c3b --- /dev/null +++ b/core/os/os2/pipe_windows.odin @@ -0,0 +1,13 @@ +//+private +package os2 + +import win32 "core:sys/windows" + +_pipe :: proc() -> (r, w: Handle, err: Error) { + p: [2]win32.HANDLE; + if !win32.CreatePipe(&p[0], &p[1], nil, 0) { + return 0, 0, error_from_platform_error(i32(win32.GetLastError())); + } + return Handle(p[0]), Handle(p[1]), nil; +} + |