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

Comparing Linux-AIO/AIO.xs (file contents):
Revision 1.26 by root, Thu Jul 7 23:17:23 2005 UTC vs.
Revision 1.27 by root, Fri Jul 8 03:10:00 2005 UTC

14 14
15typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */ 15typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */
16typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */ 16typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */
17typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */ 17typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */
18 18
19// 128 seems to be enough most everywhere. alpha needs 256. 19#if __i386 || __amd64
20#define STACKSIZE (256 * sizeof (long)) 20# define STACKSIZE ( 256 * sizeof (long))
21#elif __ia64
22# define STACKSIZE (8192 * sizeof (long))
23#else
24# define STACKSIZE ( 512 * sizeof (long))
25#endif
21 26
22enum { 27enum {
23 REQ_QUIT, 28 REQ_QUIT,
24 REQ_OPEN, REQ_CLOSE, REQ_READ, REQ_WRITE, 29 REQ_OPEN, REQ_CLOSE, REQ_READ, REQ_WRITE,
25 REQ_STAT, REQ_LSTAT, REQ_FSTAT, REQ_UNLINK 30 REQ_STAT, REQ_LSTAT, REQ_FSTAT, REQ_UNLINK
64 aio_thread *thr; 69 aio_thread *thr;
65 70
66 New (0, thr, 1, aio_thread); 71 New (0, thr, 1, aio_thread);
67 72
68 if (clone (aio_proc, 73 if (clone (aio_proc,
69 &(thr->stack[STACKSIZE - sizeof (long)]), 74 &(thr->stack[STACKSIZE - 16]),
70 CLONE_VM|CLONE_FS|CLONE_FILES, 75 CLONE_VM|CLONE_FS|CLONE_FILES,
71 thr) >= 0) 76 thr) >= 0)
72 started++; 77 started++;
73 else 78 else
74 Safefree (thr); 79 Safefree (thr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines