diff options
Diffstat (limited to 'src/compat-0_1.c')
-rw-r--r-- | src/compat-0_1.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/compat-0_1.c b/src/compat-0_1.c index d689bff..343a33f 100644 --- a/src/compat-0_1.c +++ b/src/compat-0_1.c @@ -27,6 +27,28 @@ #include "syscall.h" +/* + * Compatible interfaces that still need an entry point. + */ + +SYMVER(compat0_1_io_queue_init, io_queue_init, 0.1); +int compat0_1_io_queue_init(int maxevents, io_context_t *ctxp) +{ + return io_queue_init(maxevents, ctxp); +} + +SYMVER(compat0_1_io_queue_run, io_queue_run, 0.1); +int compat0_1_io_queue_run(io_context_t ctx) +{ + return io_queue_run(ctx); +} + +SYMVER(compat0_1_io_submit, io_submit, 0.1); +int compat0_1_io_submit(io_context_t ctx, long nr, struct iocb **iocbs) +{ + return io_submit(ctx, nr, iocbs); +} + /* ABI change. Provide partial compatibility on this one for now. */ SYMVER(compat0_1_io_cancel, io_cancel, 0.1); int compat0_1_io_cancel(io_context_t ctx, struct iocb *iocb) @@ -38,11 +60,19 @@ int compat0_1_io_cancel(io_context_t ctx, struct iocb *iocb) } SYMVER(compat0_1_io_queue_wait, io_queue_wait, 0.1); -int compat0_1_io_queue_wait(io_context_t ctx, struct iocb *iocb, const struct timespec *when) +int compat0_1_io_queue_wait(io_context_t ctx, struct timespec *when) { - return -ENOSYS; + struct timespec timeout; + if (when) + timeout = *when; + return io_getevents(ctx, 0, 0, NULL, when ? &timeout : NULL); } +SYMVER(compat0_1_io_queue_release, io_queue_release, 0.1); +int compat0_1_io_queue_release(io_context_t ctx) +{ + return io_destroy(ctx); +} /* ABI change. Provide backwards compatibility for this one. */ SYMVER(compat0_1_io_getevents, io_getevents, 0.1); |