aioread
emsca!usb!beto at sun.com
emsca!usb!beto at sun.com
Sat Jan 5 14:26:37 AEST 1991
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 at sun.com
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/asynch.h>
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);
}
}
More information about the Comp.unix.internals
mailing list