diff options
Diffstat (limited to 'src/io/io_linux.zig')
-rw-r--r-- | src/io/io_linux.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/io/io_linux.zig b/src/io/io_linux.zig index d3af77d7c..00cc0c03e 100644 --- a/src/io/io_linux.zig +++ b/src/io/io_linux.zig @@ -987,9 +987,13 @@ pub const Completion = struct { pub const Waker = struct { fd: os.fd_t, - pub fn init(_: std.mem.Allocator) !Waker { + pub fn init(allocator: std.mem.Allocator) !Waker { + return try initWithFileDescriptor(allocator, try std.os.eventfd(0, 0)); + } + + pub fn initWithFileDescriptor(_: std.mem.Allocator, fd: os.fd_t) Waker { return Waker{ - .fd = try os.eventfd(0, 0), + .fd = fd, }; } |