From: Tom Hughes Date: Fri, 16 Jul 2004 06:03:24 +0000 (+0000) Subject: Commit missing kernel interface definitions for async I/O calls. X-Git-Tag: svn/VALGRIND_2_1_2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6374702f6c8e6681fb05770eb95895b89cb3be85;p=thirdparty%2Fvalgrind.git Commit missing kernel interface definitions for async I/O calls. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2486 --- diff --git a/include/vg_kerneliface.h b/include/vg_kerneliface.h index 7ba9b3dcc2..6a8c30d84d 100644 --- a/include/vg_kerneliface.h +++ b/include/vg_kerneliface.h @@ -882,6 +882,64 @@ struct elf_prpsinfo char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ }; +/* + * linux/aio_abi.h + */ + +typedef struct { + unsigned id; /* kernel internal index number */ + unsigned nr; /* number of io_events */ + unsigned head; + unsigned tail; + + unsigned magic; + unsigned compat_features; + unsigned incompat_features; + unsigned header_length; /* size of aio_ring */ +} vki_aio_ring ; + +typedef vki_aio_ring *vki_aio_context_t; + +typedef struct { + ULong data; + ULong obj; + Long result; + Long result2; +} vki_io_event; + +typedef struct { + /* these are internal to the kernel/libc. */ + ULong aio_data; /* data to be returned in event's data */ + ULong aio_key; + /* the kernel sets aio_key to the req # */ + + /* common fields */ + UShort aio_lio_opcode; /* see IOCB_CMD_ above */ + UShort aio_reqprio; + UInt aio_fildes; + + ULong aio_buf; + ULong aio_nbytes; + Long aio_offset; + + /* extra parameters */ + ULong aio_reserved2; /* TODO: use this for a (struct sigevent *) */ + ULong aio_reserved3; +} vki_iocb; /* 64 bytes */ + +enum { + VKI_IOCB_CMD_PREAD = 0, + VKI_IOCB_CMD_PWRITE = 1, + VKI_IOCB_CMD_FSYNC = 2, + VKI_IOCB_CMD_FDSYNC = 3, + /* These two are experimental. + * IOCB_CMD_PREADX = 4, + * IOCB_CMD_POLL = 5, + */ + VKI_IOCB_CMD_NOOP = 6, +}; + + #endif /* __VG_KERNELIFACE_H */ /*--------------------------------------------------------------------*/