ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.xs
(Generate patch)

Comparing IO-AIO/AIO.xs (file contents):
Revision 1.9 by root, Tue Jul 12 11:02:54 2005 UTC vs.
Revision 1.10 by root, Wed Jul 13 00:13:09 2005 UTC

1#include "EXTERN.h" 1#include "EXTERN.h"
2#include "perl.h" 2#include "perl.h"
3#include "XSUB.h" 3#include "XSUB.h"
4 4
5#define _XOPEN_SOURCE 500
6
5#include <sys/types.h> 7#include <sys/types.h>
6#include <sys/stat.h> 8#include <sys/stat.h>
9
7#include <unistd.h> 10#include <unistd.h>
8#include <fcntl.h> 11#include <fcntl.h>
9#include <signal.h> 12#include <signal.h>
10#include <sched.h> 13#include <sched.h>
14#if __linux
15#include <sys/syscall.h>
16#endif
11 17
12#include <pthread.h> 18#include <pthread.h>
13#include <sys/syscall.h>
14 19
15typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */ 20typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */
16typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */ 21typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */
17typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */ 22typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */
18 23
308 313
309 type = req->type; 314 type = req->type;
310 315
311 switch (type) 316 switch (type)
312 { 317 {
313 case REQ_READ: req->result = pread64 (req->fd, req->dataptr, req->length, req->offset); break; 318 case REQ_READ: req->result = pread (req->fd, req->dataptr, req->length, req->offset); break;
314 case REQ_WRITE: req->result = pwrite64 (req->fd, req->dataptr, req->length, req->offset); break; 319 case REQ_WRITE: req->result = pwrite (req->fd, req->dataptr, req->length, req->offset); break;
315#if SYS_readahead 320#if SYS_readahead
316 case REQ_READAHEAD: req->result = readahead (req->fd, req->offset, req->length); break; 321 case REQ_READAHEAD: req->result = readahead (req->fd, req->offset, req->length); break;
317#else 322#else
318 case REQ_READAHEAD: req->result = -1; errno = ENOSYS; break; 323 case REQ_READAHEAD: req->result = -1; errno = ENOSYS; break;
319#endif 324#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines