summaryrefslogtreecommitdiff
path: root/test/helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/helpers.c')
-rw-r--r--test/helpers.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/helpers.c b/test/helpers.c
index 7acf184..83ed3e5 100644
--- a/test/helpers.c
+++ b/test/helpers.c
@@ -17,3 +17,14 @@ void *io_uring_malloc(size_t size)
assert(ret);
return ret;
}
+
+
+/*
+ * Helper for allocating size bytes aligned on a boundary.
+ */
+void io_uring_posix_memalign(void **memptr, size_t alignment, size_t size)
+{
+ int ret;
+ ret = posix_memalign(memptr, alignment, size);
+ assert(!ret);
+}