summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libasyncio/include/asyncio/AsyncIO.h')
-rw-r--r--libasyncio/include/asyncio/AsyncIO.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/libasyncio/include/asyncio/AsyncIO.h b/libasyncio/include/asyncio/AsyncIO.h
index e3fb93a4d..9620d2a84 100644
--- a/libasyncio/include/asyncio/AsyncIO.h
+++ b/libasyncio/include/asyncio/AsyncIO.h
@@ -17,9 +17,9 @@
17#ifndef _ASYNCIO_H 17#ifndef _ASYNCIO_H
18#define _ASYNCIO_H 18#define _ASYNCIO_H
19 19
20#include <cstring>
21#include <cstdint>
22#include <linux/aio_abi.h> 20#include <linux/aio_abi.h>
21#include <stdbool.h>
22#include <stdint.h>
23#include <sys/cdefs.h> 23#include <sys/cdefs.h>
24#include <sys/types.h> 24#include <sys/types.h>
25#include <time.h> 25#include <time.h>
@@ -35,10 +35,14 @@ extern "C" {
35 35
36int io_setup(unsigned nr, aio_context_t* ctxp); 36int io_setup(unsigned nr, aio_context_t* ctxp);
37int io_destroy(aio_context_t ctx); 37int io_destroy(aio_context_t ctx);
38int io_submit(aio_context_t ctx, long nr, iocb** iocbpp); 38int io_submit(aio_context_t ctx, long nr, struct iocb** iocbpp);
39int io_getevents(aio_context_t ctx, long min_nr, long max_nr, io_event* events, timespec* timeout); 39int io_getevents(aio_context_t ctx, long min_nr, long max_nr, struct io_event* events,
40int io_cancel(aio_context_t ctx, iocb*, io_event* result); 40 struct timespec* timeout);
41void io_prep(iocb* iocb, int fd, const void* buf, uint64_t count, int64_t offset, bool read); 41int io_cancel(aio_context_t ctx, struct iocb*, struct io_event* result);
42
43void io_prep_pread(struct iocb* iocb, int fd, void* buf, size_t count, long long offset);
44void io_prep_pwrite(struct iocb* iocb, int fd, void* buf, size_t count, long long offset);
45void io_prep(struct iocb* iocb, int fd, const void* buf, uint64_t count, int64_t offset, bool read);
42 46
43#ifdef __cplusplus 47#ifdef __cplusplus
44}; 48};