… | |
… | |
9 | #include <unistd.h> |
9 | #include <unistd.h> |
10 | #include <fcntl.h> |
10 | #include <fcntl.h> |
11 | #include <signal.h> |
11 | #include <signal.h> |
12 | #include <sched.h> |
12 | #include <sched.h> |
13 | |
13 | |
14 | typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */ |
14 | typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */ |
15 | typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */ |
15 | typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */ |
16 | typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */ |
16 | typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */ |
17 | |
17 | |
18 | #ifndef __NR_pread64 |
18 | // 128 seems to be enough most everywhere. alpha needs 256. |
19 | # define __NR_pread64 __NR_pread |
19 | #define STACKSIZE (256 * sizeof (long)) |
20 | #endif |
|
|
21 | #ifndef __NR_pwrite64 |
|
|
22 | # define __NR_pwrite64 __NR_pwrite |
|
|
23 | #endif |
|
|
24 | |
20 | |
25 | #define STACKSIZE 1024 /* yeah */ |
21 | enum { |
26 | |
22 | REQ_QUIT, |
27 | enum { REQ_QUIT, REQ_OPEN, REQ_CLOSE, REQ_READ, REQ_WRITE, REQ_STAT, REQ_LSTAT, REQ_FSTAT}; |
23 | REQ_OPEN, REQ_CLOSE, REQ_READ, REQ_WRITE, |
|
|
24 | REQ_STAT, REQ_LSTAT, REQ_FSTAT, REQ_UNLINK |
|
|
25 | }; |
28 | |
26 | |
29 | typedef struct { |
27 | typedef struct { |
30 | char stack[STACKSIZE]; |
28 | char stack[STACKSIZE]; |
31 | } aio_thread; |
29 | } aio_thread; |
32 | |
30 | |
33 | typedef struct { |
31 | typedef struct aio_cb { |
|
|
32 | struct aio_cb *next; |
|
|
33 | |
34 | int type; |
34 | int type; |
35 | aio_thread *thread; |
35 | aio_thread *thread; |
36 | |
36 | |
37 | int fd; |
37 | int fd; |
38 | off_t offset; |
38 | off_t offset; |
… | |
… | |
42 | int errorno; |
42 | int errorno; |
43 | SV *data, *callback; |
43 | SV *data, *callback; |
44 | void *dataptr; |
44 | void *dataptr; |
45 | STRLEN dataoffset; |
45 | STRLEN dataoffset; |
46 | |
46 | |
47 | struct stat64 *statdata; |
47 | Stat_t *statdata; |
48 | } aio_cb; |
48 | } aio_cb; |
49 | |
49 | |
50 | typedef aio_cb *aio_req; |
50 | typedef aio_cb *aio_req; |
51 | |
51 | |
52 | static int started; |
52 | static int started; |
53 | static int nreqs; |
53 | static int nreqs; |
54 | static int reqpipe[2], respipe[2]; |
54 | static int reqpipe[2], respipe[2]; |
55 | |
55 | |
|
|
56 | static aio_req qs, qe; /* queue start, queue end */ |
|
|
57 | |
56 | static int aio_proc(void *arg); |
58 | static int aio_proc(void *arg); |
57 | |
59 | |
58 | static void |
60 | static void |
59 | start_thread(void) |
61 | start_thread (void) |
60 | { |
62 | { |
61 | aio_thread *thr; |
63 | aio_thread *thr; |
62 | |
64 | |
63 | New (0, thr, 1, aio_thread); |
65 | New (0, thr, 1, aio_thread); |
64 | |
66 | |
65 | if (clone (aio_proc, |
67 | if (clone (aio_proc, |
66 | &(thr->stack[STACKSIZE]), |
68 | &(thr->stack[STACKSIZE - sizeof (long)]), |
67 | CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND, |
69 | CLONE_VM|CLONE_FS|CLONE_FILES, |
68 | thr) >= 0) |
70 | thr) >= 0) |
69 | started++; |
71 | started++; |
70 | else |
72 | else |
71 | Safefree (thr); |
73 | Safefree (thr); |
72 | } |
74 | } |
73 | |
75 | |
74 | static void |
76 | static void |
|
|
77 | send_reqs (void) |
|
|
78 | { |
|
|
79 | /* this write is atomic */ |
|
|
80 | while (qs && write (reqpipe[1], &qs, sizeof qs) == sizeof qs) |
|
|
81 | { |
|
|
82 | qs = qs->next; |
|
|
83 | if (!qs) qe = 0; |
|
|
84 | } |
|
|
85 | } |
|
|
86 | |
|
|
87 | static void |
|
|
88 | send_req (aio_req req) |
|
|
89 | { |
|
|
90 | nreqs++; |
|
|
91 | req->next = 0; |
|
|
92 | |
|
|
93 | if (qe) |
|
|
94 | { |
|
|
95 | qe->next = req; |
|
|
96 | qe = req; |
|
|
97 | } |
|
|
98 | else |
|
|
99 | qe = qs = req; |
|
|
100 | |
|
|
101 | send_reqs (); |
|
|
102 | } |
|
|
103 | |
|
|
104 | static void |
75 | end_thread(void) |
105 | end_thread (void) |
76 | { |
106 | { |
77 | aio_req req; |
107 | aio_req req; |
78 | New (0, req, 1, aio_cb); |
108 | New (0, req, 1, aio_cb); |
79 | req->type = REQ_QUIT; |
109 | req->type = REQ_QUIT; |
80 | write (reqpipe[1], &req, sizeof (aio_req)); |
|
|
81 | } |
|
|
82 | |
110 | |
83 | static void |
111 | send_req (req); |
84 | send_req (aio_req req) |
|
|
85 | { |
|
|
86 | nreqs++; |
|
|
87 | write (reqpipe[1], &req, sizeof (aio_req)); |
|
|
88 | } |
112 | } |
89 | |
113 | |
90 | static void |
114 | static void |
91 | read_write (pTHX_ |
115 | read_write (pTHX_ |
92 | int dowrite, int fd, off_t offset, size_t length, |
116 | int dowrite, int fd, off_t offset, size_t length, |
93 | SV *data, STRLEN dataoffset, SV*callback) |
117 | SV *data, STRLEN dataoffset, SV *callback) |
94 | { |
118 | { |
95 | aio_req req; |
119 | aio_req req; |
96 | STRLEN svlen; |
120 | STRLEN svlen; |
97 | char *svptr = SvPV (data, svlen); |
121 | char *svptr = SvPV (data, svlen); |
98 | |
122 | |
… | |
… | |
134 | req->callback = SvREFCNT_inc (callback); |
158 | req->callback = SvREFCNT_inc (callback); |
135 | |
159 | |
136 | send_req (req); |
160 | send_req (req); |
137 | } |
161 | } |
138 | |
162 | |
|
|
163 | static void |
|
|
164 | poll_wait () |
|
|
165 | { |
|
|
166 | fd_set rfd; |
|
|
167 | FD_ZERO(&rfd); |
|
|
168 | FD_SET(respipe[0], &rfd); |
|
|
169 | |
|
|
170 | select (respipe[0] + 1, &rfd, 0, 0, 0); |
|
|
171 | } |
|
|
172 | |
139 | static int |
173 | static int |
140 | poll_cb (pTHX) |
174 | poll_cb (pTHX) |
141 | { |
175 | { |
142 | dSP; |
176 | dSP; |
143 | int count = 0; |
177 | int count = 0; |
144 | aio_req req; |
178 | aio_req req; |
145 | |
179 | |
146 | while (read (respipe[0], (void *)&req, sizeof (req)) == sizeof (req)) |
180 | while (read (respipe[0], (void *)&req, sizeof (req)) == sizeof (req)) |
147 | { |
181 | { |
|
|
182 | nreqs--; |
|
|
183 | |
148 | if (req->type == REQ_QUIT) |
184 | if (req->type == REQ_QUIT) |
149 | { |
185 | { |
150 | Safefree (req->thread); |
186 | Safefree (req->thread); |
151 | started--; |
187 | started--; |
152 | } |
188 | } |
… | |
… | |
162 | if (req->data) |
198 | if (req->data) |
163 | SvREFCNT_dec (req->data); |
199 | SvREFCNT_dec (req->data); |
164 | |
200 | |
165 | if (req->type == REQ_STAT || req->type == REQ_LSTAT || req->type == REQ_FSTAT) |
201 | if (req->type == REQ_STAT || req->type == REQ_LSTAT || req->type == REQ_FSTAT) |
166 | { |
202 | { |
167 | PL_laststype = req->type == REQ_LSTAT ? OP_LSTAT : OP_STAT; |
203 | PL_laststype = req->type == REQ_LSTAT ? OP_LSTAT : OP_STAT; |
168 | PL_laststatval = req->result; |
204 | PL_laststatval = req->result; |
169 | PL_statcache.st_dev = req->statdata->st_dev; |
205 | PL_statcache = *(req->statdata); |
170 | PL_statcache.st_ino = req->statdata->st_ino; |
|
|
171 | PL_statcache.st_mode = req->statdata->st_mode; |
|
|
172 | PL_statcache.st_nlink = req->statdata->st_nlink; |
|
|
173 | PL_statcache.st_uid = req->statdata->st_uid; |
|
|
174 | PL_statcache.st_gid = req->statdata->st_gid; |
|
|
175 | PL_statcache.st_rdev = req->statdata->st_rdev; |
|
|
176 | PL_statcache.st_size = req->statdata->st_size; |
|
|
177 | PL_statcache.st_atime = req->statdata->st_atime; |
|
|
178 | PL_statcache.st_mtime = req->statdata->st_mtime; |
|
|
179 | PL_statcache.st_ctime = req->statdata->st_ctime; |
|
|
180 | PL_statcache.st_blksize = req->statdata->st_blksize; |
|
|
181 | PL_statcache.st_blocks = req->statdata->st_blocks; |
|
|
182 | |
206 | |
183 | Safefree (req->statdata); |
207 | Safefree (req->statdata); |
184 | } |
208 | } |
185 | |
209 | |
186 | PUSHMARK (SP); |
210 | PUSHMARK (SP); |
… | |
… | |
191 | |
215 | |
192 | if (req->callback) |
216 | if (req->callback) |
193 | SvREFCNT_dec (req->callback); |
217 | SvREFCNT_dec (req->callback); |
194 | |
218 | |
195 | errno = errorno; |
219 | errno = errorno; |
196 | nreqs--; |
|
|
197 | count++; |
220 | count++; |
198 | } |
221 | } |
199 | |
222 | |
200 | Safefree (req); |
223 | Safefree (req); |
201 | } |
224 | } |
202 | |
225 | |
|
|
226 | if (qs) |
|
|
227 | send_reqs (); |
|
|
228 | |
203 | return count; |
229 | return count; |
204 | } |
230 | } |
205 | |
231 | |
206 | static sigset_t fullsigset; |
232 | static sigset_t fullsigset; |
207 | |
233 | |
208 | #undef errno |
234 | #undef errno |
209 | #include <asm/unistd.h> |
235 | #include <asm/unistd.h> |
|
|
236 | #include <sys/prctl.h> |
|
|
237 | |
|
|
238 | #if __alpha || __ia64 || __hppa || __sparc64__ || __v850__ |
|
|
239 | # define stat kernelstat |
|
|
240 | # define stat64 kernelstat64 |
|
|
241 | # include <asm/stat.h> |
|
|
242 | # undef stat |
|
|
243 | # undef stat64 |
|
|
244 | #else |
|
|
245 | # define kernelstat stat |
|
|
246 | # define kernelstat64 stat64 |
|
|
247 | #endif |
|
|
248 | |
|
|
249 | #define COPY_STATDATA \ |
|
|
250 | req->statdata->st_dev = statdata.st_dev; \ |
|
|
251 | req->statdata->st_ino = statdata.st_ino; \ |
|
|
252 | req->statdata->st_mode = statdata.st_mode; \ |
|
|
253 | req->statdata->st_nlink = statdata.st_nlink; \ |
|
|
254 | req->statdata->st_uid = statdata.st_uid; \ |
|
|
255 | req->statdata->st_gid = statdata.st_gid; \ |
|
|
256 | req->statdata->st_rdev = statdata.st_rdev; \ |
|
|
257 | req->statdata->st_size = statdata.st_size; \ |
|
|
258 | req->statdata->st_atime = statdata.st_atime; \ |
|
|
259 | req->statdata->st_mtime = statdata.st_mtime; \ |
|
|
260 | req->statdata->st_ctime = statdata.st_ctime; \ |
|
|
261 | req->statdata->st_blksize = statdata.st_blksize; \ |
|
|
262 | req->statdata->st_blocks = statdata.st_blocks; \ |
210 | |
263 | |
211 | static int |
264 | static int |
212 | aio_proc(void *thr_arg) |
265 | aio_proc (void *thr_arg) |
213 | { |
266 | { |
214 | aio_thread *thr = thr_arg; |
267 | aio_thread *thr = thr_arg; |
215 | aio_req req; |
268 | aio_req req; |
216 | int errno; |
269 | int errno; |
217 | |
270 | |
218 | /* this is very much x86 and kernel-specific :(:(:( */ |
271 | /* this is very much kernel-specific :(:(:( */ |
219 | /* we rely on gcc's ability to create closures. */ |
272 | /* we rely on gcc's ability to create closures. */ |
220 | _syscall3(int,read,int,fd,char *,buf,size_t,count) |
273 | _syscall3(int,read,int,fd,char *,buf,size_t,count) |
221 | _syscall3(int,write,int,fd,char *,buf,size_t,count) |
274 | _syscall3(int,write,int,fd,char *,buf,size_t,count) |
222 | |
275 | |
223 | _syscall3(int,open,char *,pathname,int,flags,mode_t,mode) |
276 | _syscall3(int,open,char *,pathname,int,flags,mode_t,mode) |
224 | _syscall1(int,close,int,fd) |
277 | _syscall1(int,close,int,fd) |
225 | |
278 | |
|
|
279 | #if __NR_pread64 |
226 | _syscall5(int,pread64,int,fd,char *,buf,size_t,count,unsigned int,offset_lo,unsigned int,offset_hi) |
280 | _syscall5(int,pread64,int,fd,char *,buf,size_t,count,unsigned int,offset_lo,unsigned int,offset_hi) |
227 | _syscall5(int,pwrite64,int,fd,char *,buf,size_t,count,unsigned int,offset_lo,unsigned int,offset_hi) |
281 | _syscall5(int,pwrite64,int,fd,char *,buf,size_t,count,unsigned int,offset_lo,unsigned int,offset_hi) |
|
|
282 | #elif __NR_pread |
|
|
283 | _syscall4(int,pread,int,fd,char *,buf,size_t,count,offset_t,offset) |
|
|
284 | _syscall4(int,pwrite,int,fd,char *,buf,size_t,count,offset_t,offset) |
|
|
285 | #else |
|
|
286 | # error "neither pread nor pread64 defined" |
|
|
287 | #endif |
228 | |
288 | |
|
|
289 | |
|
|
290 | #if __NR_stat64 |
229 | _syscall2(int,stat64, const char *, filename, struct stat64 *, buf) |
291 | _syscall2(int,stat64, const char *, filename, struct kernelstat64 *, buf) |
230 | _syscall2(int,lstat64, const char *, filename, struct stat64 *, buf) |
292 | _syscall2(int,lstat64, const char *, filename, struct kernelstat64 *, buf) |
231 | _syscall2(int,fstat64, int, fd, struct stat64 *, buf) |
293 | _syscall2(int,fstat64, int, fd, struct kernelstat64 *, buf) |
|
|
294 | #elif __NR_stat |
|
|
295 | _syscall2(int,stat, const char *, filename, struct kernelstat *, buf) |
|
|
296 | _syscall2(int,lstat, const char *, filename, struct kernelstat *, buf) |
|
|
297 | _syscall2(int,fstat, int, fd, struct kernelstat *, buf) |
|
|
298 | #else |
|
|
299 | # error "neither stat64 nor stat defined" |
|
|
300 | #endif |
|
|
301 | |
|
|
302 | _syscall1(int,unlink, char *, filename); |
232 | |
303 | |
233 | sigprocmask (SIG_SETMASK, &fullsigset, 0); |
304 | sigprocmask (SIG_SETMASK, &fullsigset, 0); |
|
|
305 | prctl (PR_SET_PDEATHSIG, SIGKILL); |
234 | |
306 | |
235 | /* then loop */ |
307 | /* then loop */ |
236 | while (read (reqpipe[0], (void *)&req, sizeof (req)) == sizeof (req)) |
308 | while (read (reqpipe[0], (void *)&req, sizeof (req)) == sizeof (req)) |
237 | { |
309 | { |
238 | req->thread = thr; |
310 | req->thread = thr; |
239 | errno = 0; /* strictly unnecessary */ |
311 | errno = 0; /* strictly unnecessary */ |
240 | |
312 | |
241 | if (req->type == REQ_READ) |
313 | switch (req->type) |
242 | req->result = pread64 (req->fd, req->dataptr, req->length, req->offset & 0xffffffff, req->offset >> 32); |
|
|
243 | else if (req->type == REQ_WRITE) |
|
|
244 | req->result = pwrite64(req->fd, req->dataptr, req->length, req->offset & 0xffffffff, req->offset >> 32); |
|
|
245 | else if (req->type == REQ_OPEN) |
|
|
246 | req->result = open (req->dataptr, req->fd, req->mode); |
|
|
247 | else if (req->type == REQ_CLOSE) |
|
|
248 | req->result = close (req->fd); |
|
|
249 | else if (req->type == REQ_STAT) |
|
|
250 | req->result = stat64 (req->dataptr, req->statdata); |
|
|
251 | else if (req->type == REQ_LSTAT) |
|
|
252 | req->result = lstat64 (req->dataptr, req->statdata); |
|
|
253 | else if (req->type == REQ_FSTAT) |
|
|
254 | req->result = fstat64 (req->fd, req->statdata); |
|
|
255 | else |
|
|
256 | { |
314 | { |
|
|
315 | #if __NR_pread64 |
|
|
316 | case REQ_READ: req->result = pread64 (req->fd, req->dataptr, req->length, req->offset & 0xffffffff, req->offset >> 32); break; |
|
|
317 | case REQ_WRITE: req->result = pwrite64(req->fd, req->dataptr, req->length, req->offset & 0xffffffff, req->offset >> 32); break; |
|
|
318 | #else |
|
|
319 | case REQ_READ: req->result = pread (req->fd, req->dataptr, req->length, req->offset); break; |
|
|
320 | case REQ_WRITE: req->result = pwrite (req->fd, req->dataptr, req->length, req->offset); break; |
|
|
321 | #endif |
|
|
322 | #if __NR_stat64 |
|
|
323 | struct kernelstat64 statdata; |
|
|
324 | case REQ_STAT: req->result = stat64 (req->dataptr, &statdata); COPY_STATDATA; break; |
|
|
325 | case REQ_LSTAT: req->result = lstat64 (req->dataptr, &statdata); COPY_STATDATA; break; |
|
|
326 | case REQ_FSTAT: req->result = fstat64 (req->fd, &statdata); COPY_STATDATA; break; |
|
|
327 | #else |
|
|
328 | struct kernelstat statdata; |
|
|
329 | case REQ_STAT: req->result = stat (req->dataptr, &statdata); COPY_STATDATA; break; |
|
|
330 | case REQ_LSTAT: req->result = lstat (req->dataptr, &statdata); COPY_STATDATA; break; |
|
|
331 | case REQ_FSTAT: req->result = fstat (req->fd, &statdata); COPY_STATDATA; break; |
|
|
332 | #endif |
|
|
333 | case REQ_OPEN: req->result = open (req->dataptr, req->fd, req->mode); break; |
|
|
334 | case REQ_CLOSE: req->result = close (req->fd); break; |
|
|
335 | case REQ_UNLINK: req->result = unlink (req->dataptr); break; |
|
|
336 | |
|
|
337 | case REQ_QUIT: |
|
|
338 | default: |
257 | write (respipe[1], (void *)&req, sizeof (req)); |
339 | write (respipe[1], (void *)&req, sizeof (req)); |
258 | break; |
340 | return 0; |
259 | } |
341 | } |
260 | |
342 | |
261 | req->errorno = errno; |
343 | req->errorno = errno; |
262 | write (respipe[1], (void *)&req, sizeof (req)); |
344 | write (respipe[1], (void *)&req, sizeof (req)); |
263 | } |
345 | } |
… | |
… | |
275 | sigdelset (&fullsigset, SIGABRT); |
357 | sigdelset (&fullsigset, SIGABRT); |
276 | sigdelset (&fullsigset, SIGINT); |
358 | sigdelset (&fullsigset, SIGINT); |
277 | |
359 | |
278 | if (pipe (reqpipe) || pipe (respipe)) |
360 | if (pipe (reqpipe) || pipe (respipe)) |
279 | croak ("unable to initialize request or result pipe"); |
361 | croak ("unable to initialize request or result pipe"); |
|
|
362 | |
|
|
363 | if (fcntl (reqpipe[1], F_SETFL, O_NONBLOCK)) |
|
|
364 | croak ("cannot set result pipe to nonblocking mode"); |
280 | |
365 | |
281 | if (fcntl (respipe[0], F_SETFL, O_NONBLOCK)) |
366 | if (fcntl (respipe[0], F_SETFL, O_NONBLOCK)) |
282 | croak ("cannot set result pipe to nonblocking mode"); |
367 | croak ("cannot set result pipe to nonblocking mode"); |
283 | } |
368 | } |
284 | |
369 | |
… | |
… | |
302 | cur--; |
387 | cur--; |
303 | } |
388 | } |
304 | |
389 | |
305 | while (started > nthreads) |
390 | while (started > nthreads) |
306 | { |
391 | { |
307 | fd_set rfd; |
392 | poll_wait (); |
308 | FD_ZERO(&rfd); |
|
|
309 | FD_SET(respipe[0], &rfd); |
|
|
310 | |
|
|
311 | select (respipe[0] + 1, &rfd, 0, 0, 0); |
|
|
312 | poll_cb (aTHX); |
393 | poll_cb (aTHX); |
313 | } |
394 | } |
314 | |
395 | |
315 | void |
396 | void |
316 | aio_open(pathname,flags,mode,callback) |
397 | aio_open(pathname,flags,mode,callback) |
… | |
… | |
392 | Newz (0, req, 1, aio_cb); |
473 | Newz (0, req, 1, aio_cb); |
393 | |
474 | |
394 | if (!req) |
475 | if (!req) |
395 | croak ("out of memory during aio_req allocation"); |
476 | croak ("out of memory during aio_req allocation"); |
396 | |
477 | |
397 | New (0, req->statdata, 1, struct stat64); |
478 | New (0, req->statdata, 1, Stat_t); |
398 | |
479 | |
399 | if (!req->statdata) |
480 | if (!req->statdata) |
400 | croak ("out of memory during aio_req->statdata allocation"); |
481 | croak ("out of memory during aio_req->statdata allocation"); |
401 | |
482 | |
402 | if (SvPOK (fh_or_path)) |
483 | if (SvPOK (fh_or_path)) |
… | |
… | |
413 | |
494 | |
414 | req->callback = SvREFCNT_inc (callback); |
495 | req->callback = SvREFCNT_inc (callback); |
415 | |
496 | |
416 | send_req (req); |
497 | send_req (req); |
417 | |
498 | |
|
|
499 | void |
|
|
500 | aio_unlink(pathname,callback) |
|
|
501 | SV * pathname |
|
|
502 | SV * callback |
|
|
503 | PROTOTYPE: $$ |
|
|
504 | CODE: |
|
|
505 | aio_req req; |
|
|
506 | |
|
|
507 | Newz (0, req, 1, aio_cb); |
|
|
508 | |
|
|
509 | if (!req) |
|
|
510 | croak ("out of memory during aio_req allocation"); |
|
|
511 | |
|
|
512 | req->type = REQ_UNLINK; |
|
|
513 | req->data = newSVsv (pathname); |
|
|
514 | req->dataptr = SvPV_nolen (req->data); |
|
|
515 | req->callback = SvREFCNT_inc (callback); |
|
|
516 | |
|
|
517 | send_req (req); |
|
|
518 | |
418 | int |
519 | int |
419 | poll_fileno() |
520 | poll_fileno() |
420 | PROTOTYPE: |
521 | PROTOTYPE: |
421 | CODE: |
522 | CODE: |
422 | RETVAL = respipe[0]; |
523 | RETVAL = respipe[0]; |
… | |
… | |
429 | CODE: |
530 | CODE: |
430 | RETVAL = poll_cb (aTHX); |
531 | RETVAL = poll_cb (aTHX); |
431 | OUTPUT: |
532 | OUTPUT: |
432 | RETVAL |
533 | RETVAL |
433 | |
534 | |
|
|
535 | void |
|
|
536 | poll_wait() |
|
|
537 | PROTOTYPE: |
|
|
538 | CODE: |
|
|
539 | poll_wait (); |
|
|
540 | |
434 | int |
541 | int |
435 | nreqs() |
542 | nreqs() |
436 | PROTOTYPE: |
543 | PROTOTYPE: |
437 | CODE: |
544 | CODE: |
438 | RETVAL = nreqs; |
545 | RETVAL = nreqs; |