summaryrefslogtreecommitdiff
path: root/src/compat-0_1.c
diff options
context:
space:
mode:
authorJeff Moyer <jmoyer@redhat.com>2004-03-30 22:04:57 +0000
committerJeff Moyer <jmoyer@redhat.com>2004-03-30 22:04:57 +0000
commit45495090aa6bc285446174d46ad8e1bef8551ca1 (patch)
tree830fa6ec1435784ed02b4e59e84464532172c8cf /src/compat-0_1.c
parente8c71527f16dc9fa5753d4dd21b17bed87f1722c (diff)
downloadlibaio-45495090aa6bc285446174d46ad8e1bef8551ca1.tar.gz
o Fix header file to allow inclusion from c++ code.libaio.0-3-98.2
o Fix compatibility routines, thanks to Daniel @ osdl. o Shared library is now libaio.so.1.0.0 and links are created for libaio.so.1 and libaio.so.
Diffstat (limited to 'src/compat-0_1.c')
-rw-r--r--src/compat-0_1.c34
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);