Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!udel!haven!adm!news From: emsca!usb!beto@sun.com Newsgroups: comp.unix.internals Subject: aioread Message-ID: <25402@adm.brl.mil> Date: 5 Jan 91 03:26:37 GMT Sender: news@adm.brl.mil Lines: 34 I am trying to use the new "asynchronous I/O operations" in SUNOS 4.1, but I can't do anything with it. The principal problem is that AIOREAD() doesn't like its arguments. Here is a test program which fails. Any help would be greatly appreciated. Alberto Nava emsca!usb!beto@sun.com #include #include #include #include aio_result_t r; char buf[512]; main(argc,argv) int argc; char **argv; { int fd; if ((fd = open(argv[1],O_RDWR)) < 0) { perror(argv[1]); exit(1); } if (aioread(fd,buf,512,10,SEEK_CUR,&r) < 0) { perror("aio_read"); /* Here we get "aio_read: Invalid argument" */ exit(1); } }