Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Explanation of fields in struct iocb

 
   Soft32 Home -> Linux -> App Development RSS
Next:  [News] Best Buy Staff/Customers to be Indoctrinat..  
Author Message
adi.hodos

External


Since: Sep 10, 2009
Posts: 1



(Msg. 1) Posted: Thu Sep 10, 2009 3:15 pm
Post subject: Explanation of fields in struct iocb
Archived from groups: comp>os>linux>development>apps (more info?)

The libaio.h header file contains this definition for struct iocb and
struct io_event :
struct iocb {
PADDEDptr(void *data, __pad1); /* Return in the io completion event
*/
PADDED(unsigned key, __pad2); /* For use in identifying io requests
*/

short aio_lio_opcode;
short aio_reqprio;
int aio_fildes;

union {
struct io_iocb_common c;
struct io_iocb_vector v;
struct io_iocb_poll poll;
struct io_iocb_sockaddr saddr;
} u;
};

struct io_event {
PADDEDptr(void *data, __pad1);
PADDEDptr(struct iocb *obj, __pad2);
PADDEDul(res, __pad3);
PADDEDul(res2, __pad4);
};

The key member has this comment "/* For use in identifying io requests
*/" so I've made a program that issues multiple async i/o operations
and keeps track of them by assigning them a number in the key field.
However when doing io_getevents() every io_event.obj has the member
key reset to 0. Can I use or not the data and key members of struct
iocb ? It seems to me that at least the key member of struct iocb is
reset by the kernel when calling io_submit(). Is this a bug or the
comment in libaio.h is wrong ?
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How can i register a link protocol for browsers - I want to add an action to the system so that every time a user clicks in a link with for example ..

storing the data in ln2440 target board memory - hai.. i using the target board ln2440sbc..and linux OS.. (16Mb flash and 32Mb sdram) i have cross compiled and porte...

GTK run error - hi i had created one same application in glad interface designer with c option.the n i compiled the same after that i....

C++ -> mplayer, stdin, stdout, popen / fork / pipe... - Hello everybody. I tried to work this out on my own for about 6 hours non-stop now and I just don't get it working.......

Patch series to mark struct file_operations and struct ino.. - Hi, today a sizable portion of the "struct file_operations" variables in the kernel are const, but by far no...

[PATCH 2.6.19] struct seq_operations and struct file_opera.. - this trivial patch - moves some file_operations structs into the .rodata section - moves static strings from..
       Soft32 Home -> Linux -> App Development All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]