Implement async (overlapped) I/O with io_uring

This commit is contained in:
2025-10-06 23:51:09 -06:00
parent f366e77956
commit df36de18bf
21 changed files with 909 additions and 143 deletions

19
src/async_io.h Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include "kernel32/internal.h"
#include "kernel32/minwinbase.h"
#include <optional>
namespace async_io {
bool initialize();
void shutdown();
bool running();
bool queueRead(Pin<kernel32::FileObject> file, OVERLAPPED *ov, void *buffer, DWORD length,
const std::optional<off64_t> &offset, bool isPipe);
bool queueWrite(Pin<kernel32::FileObject> file, OVERLAPPED *ov, const void *buffer, DWORD length,
const std::optional<off64_t> &offset, bool isPipe);
} // namespace async_io