io_uring: Add basic wrapper
This is a simple RAII wrapper around a ring instance that structure SQE
/ CQE callbacks to make it convenient for C++ usage.
Change-Id: I9db8b48a81bec8d8aff4a362920f4dd688c27d57
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/meson.build b/src/meson.build
index 11bebe7..2a0169a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -68,6 +68,26 @@
error('File descriptor support required')
endif
+io_uring_dep = dependency('liburing', required: get_option('io_uring'))
+has_io_uring = false
+if not get_option('io_uring').disabled() and has_fd and io_uring_dep.found()
+ has_io_uring = true
+
+ stdplus_deps += [
+ io_uring_dep,
+ ]
+
+ stdplus_srcs += [
+ 'stdplus/io_uring.cpp',
+ ]
+
+ install_headers(
+ 'stdplus/io_uring.hpp',
+ subdir: 'stdplus')
+elif get_option('io_uring').enabled()
+ error('File descriptor support required')
+endif
+
stdplus_lib = library(
'stdplus',
stdplus_srcs,