Re: How do I make vectored AIO calls?



On May 8, 1:22 pm, "rupertlssm...@xxxxxxxxxxxxxx"
<rupertlssm...@xxxxxxxxxxxxxx> wrote:
Hi,

Please forgive my ignorance of the linux file system API; I've
obviously spent far too long in Java land! I have been working on a
Java/C implementation of the Java NIO.2 specification (JSR 203 I
think), and have implemented asynchronous file IO using the Posix API
exposed in 'aio.h'.

The Posix API does not expose vectored asynchronous reads and writes
(aio_readv and aio_writev). I do know that the Linux kernel supports
vectored asynchronous io (I'm on 2.6.22), and I have checked the
source to see that patches for this are in fact there. So my question
is, where is the API to use this? I'm guessing that I need to use the
linux native filesystem API and pass it a structure with flags set
correctly in it to request the style of io operation I am after. Do I
do this though a call to readv/writev? How are asynchronous completion
notifications delivered? A small example or pointers to where I can
learn more would be very much appreciated. Thanks for any help you can
give.

Rupert

P.S. I can obviously do the vectored calls through the Posix API by
copying blocks of memory, but that kind of misses the point.

OK. I think I figured this one out for myself. I need to install
libaio, and the API calls to use it are exposed in 'libaio.h'.

Rupert
.



Relevant Pages

  • Re: If it works, this might be interesting
    ... Software is written to the Linux API. ... more than many scheme VMs or other functional languages. ... For a compiler or other command-line tool, ...
    (alt.lang.asm)
  • Re: Digital-tv card drivers and API discussion
    ... Designing completely new api takes some time and I ... > driver development experience, I have a couple of questions for you. ... > 2) As linux kernel is GPL-licensed, I cannot just port the linux driver ... I'm able to watch DVB programs converted from MPEG TS substreams to MPEG ...
    (freebsd-arch)
  • Re: [PATCH 6/6] sched: disabled rt-bandwidth by default
    ... standards and previous Linux behaviour by default for something that it is ... monopolization" is OK to me - it still keeps runaway CPU loops (which ... RT tasks have always been debuggable by using a simple watchdog thread. ... us breaking our API to cater for their idiocity. ...
    (Linux-Kernel)
  • Re: Methods to convert Windows Code to Linux Code
    ... codes, STD, and Windows APIs. ... use libwine (microsoft windows api library for Linux) ...
    (alt.os.linux)
  • Re: How to develop a random number generation device
    ... Many operating systens are by design, immune to buffer over-runs modifying unrelated code. ... randomising memory locations) rather than actually preventing the overrun. ... If you try to run a 5-year old Linux binary on a current distribution, ... Linux, and the API is very stable - new API's and system calls are added, but existing ones are seldom changed or removed, and never without very good reason. ...
    (sci.electronics.design)