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.3 by root, Sun Jul 10 20:07:11 2005 UTC vs.
Revision 1.18 by root, Sun Jul 31 19:00:31 2005 UTC

1#define PERL_NO_GET_CONTEXT
2
3#include "EXTERN.h" 1#include "EXTERN.h"
4#include "perl.h" 2#include "perl.h"
5#include "XSUB.h" 3#include "XSUB.h"
6 4
5#include "autoconf/config.h"
6
7#include <sys/types.h> 7#include <sys/types.h>
8#include <sys/stat.h> 8#include <sys/stat.h>
9
9#include <unistd.h> 10#include <unistd.h>
10#include <fcntl.h> 11#include <fcntl.h>
11#include <signal.h> 12#include <signal.h>
12#include <sched.h> 13#include <sched.h>
14
15#ifndef _REENTRANT
16# define _REENTRANT 1
17#endif
13#include <endian.h> 18#include <errno.h>
14 19
15#include <pthread.h> 20#include <pthread.h>
16#include <sys/syscall.h>
17 21
18typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */ 22typedef void *InputStream; /* hack, but 5.6.1 is simply toooo old ;) */
19typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */ 23typedef void *OutputStream; /* hack, but 5.6.1 is simply toooo old ;) */
20typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */ 24typedef void *InOutStream; /* hack, but 5.6.1 is simply toooo old ;) */
21 25
22#if __i386 || __amd64
23# define STACKSIZE ( 256 * sizeof (long))
24#elif __ia64 26#if __ia64
25# define STACKSIZE (8192 * sizeof (long)) 27# define STACKSIZE 65536
26#else 28#else
27# define STACKSIZE ( 512 * sizeof (long)) 29# define STACKSIZE 4096
28#endif 30#endif
29 31
30enum { 32enum {
31 REQ_QUIT, 33 REQ_QUIT,
32 REQ_OPEN, REQ_CLOSE, 34 REQ_OPEN, REQ_CLOSE,
44 off_t offset; 46 off_t offset;
45 size_t length; 47 size_t length;
46 ssize_t result; 48 ssize_t result;
47 mode_t mode; /* open */ 49 mode_t mode; /* open */
48 int errorno; 50 int errorno;
49 SV *data, *callback; 51 SV *data, *callback, *fh;
50 void *dataptr; 52 void *dataptr;
51 STRLEN dataoffset; 53 STRLEN dataoffset;
52 54
53 Stat_t *statdata; 55 Stat_t *statdata;
54} aio_cb; 56} aio_cb;
55 57
56typedef aio_cb *aio_req; 58typedef aio_cb *aio_req;
57 59
58static int started; 60static int started;
59static int nreqs; 61static volatile int nreqs;
62static int max_outstanding = 1<<30;
60static int respipe [2]; 63static int respipe [2];
61 64
62static pthread_mutex_t reslock = PTHREAD_MUTEX_INITIALIZER; 65static pthread_mutex_t reslock = PTHREAD_MUTEX_INITIALIZER;
63static pthread_mutex_t reqlock = PTHREAD_MUTEX_INITIALIZER; 66static pthread_mutex_t reqlock = PTHREAD_MUTEX_INITIALIZER;
64static pthread_cond_t reqwait = PTHREAD_COND_INITIALIZER; 67static pthread_cond_t reqwait = PTHREAD_COND_INITIALIZER;
65 68
66static volatile aio_req reqs, reqe; /* queue start, queue end */ 69static volatile aio_req reqs, reqe; /* queue start, queue end */
67static volatile aio_req ress, rese; /* queue start, queue end */ 70static volatile aio_req ress, rese; /* queue start, queue end */
71
72static void
73poll_wait ()
74{
75 if (nreqs && !ress)
76 {
77 fd_set rfd;
78 FD_ZERO(&rfd);
79 FD_SET(respipe [0], &rfd);
80
81 select (respipe [0] + 1, &rfd, 0, 0, 0);
82 }
83}
84
85static int
86poll_cb ()
87{
88 dSP;
89 int count = 0;
90 aio_req req, prv;
91
92 pthread_mutex_lock (&reslock);
93
94 {
95 /* read any signals sent by the worker threads */
96 char buf [32];
97 while (read (respipe [0], buf, 32) > 0)
98 ;
99 }
100
101 req = ress;
102 ress = rese = 0;
103
104 pthread_mutex_unlock (&reslock);
105
106 while (req)
107 {
108 nreqs--;
109
110 if (req->type == REQ_QUIT)
111 started--;
112 else
113 {
114 int errorno = errno;
115 errno = req->errorno;
116
117 if (req->type == REQ_READ)
118 SvCUR_set (req->data, req->dataoffset
119 + req->result > 0 ? req->result : 0);
120
121 if (req->data)
122 SvREFCNT_dec (req->data);
123
124 if (req->fh)
125 SvREFCNT_dec (req->fh);
126
127 if (req->type == REQ_STAT || req->type == REQ_LSTAT || req->type == REQ_FSTAT)
128 {
129 PL_laststype = req->type == REQ_LSTAT ? OP_LSTAT : OP_STAT;
130 PL_laststatval = req->result;
131 PL_statcache = *(req->statdata);
132
133 Safefree (req->statdata);
134 }
135
136 ENTER;
137 PUSHMARK (SP);
138 XPUSHs (sv_2mortal (newSViv (req->result)));
139
140 if (req->type == REQ_OPEN)
141 {
142 /* convert fd to fh */
143 SV *fh;
144
145 PUTBACK;
146 call_pv ("IO::AIO::_fd2fh", G_SCALAR | G_EVAL);
147 SPAGAIN;
148
149 fh = SvREFCNT_inc (POPs);
150
151 PUSHMARK (SP);
152 XPUSHs (sv_2mortal (fh));
153 }
154
155 if (SvOK (req->callback))
156 {
157 PUTBACK;
158 call_sv (req->callback, G_VOID | G_EVAL);
159 SPAGAIN;
160 }
161
162 LEAVE;
163
164 if (req->callback)
165 SvREFCNT_dec (req->callback);
166
167 errno = errorno;
168 count++;
169 }
170
171 prv = req;
172 req = req->next;
173 Safefree (prv);
174
175 /* TODO: croak on errors? */
176 }
177
178 return count;
179}
68 180
69static void *aio_proc(void *arg); 181static void *aio_proc(void *arg);
70 182
71static void 183static void
72start_thread (void) 184start_thread (void)
105 else 217 else
106 reqe = reqs = req; 218 reqe = reqs = req;
107 219
108 pthread_cond_signal (&reqwait); 220 pthread_cond_signal (&reqwait);
109 pthread_mutex_unlock (&reqlock); 221 pthread_mutex_unlock (&reqlock);
222
223 while (nreqs > max_outstanding)
224 {
225 poll_wait ();
226 poll_cb ();
227 }
110} 228}
111 229
112static void 230static void
113end_thread (void) 231end_thread (void)
114{ 232{
117 req->type = REQ_QUIT; 235 req->type = REQ_QUIT;
118 236
119 send_req (req); 237 send_req (req);
120} 238}
121 239
122static void 240/* work around various missing functions */
123read_write (pTHX_
124 int dowrite, int fd, off_t offset, size_t length,
125 SV *data, STRLEN dataoffset, SV *callback)
126{
127 aio_req req;
128 STRLEN svlen;
129 char *svptr = SvPV (data, svlen);
130 241
131 SvUPGRADE (data, SVt_PV); 242#if !HAVE_PREADWRITE
132 SvPOK_on (data); 243# define pread aio_pread
244# define pwrite aio_pwrite
133 245
134 if (dataoffset < 0) 246/*
135 dataoffset += svlen; 247 * make our pread/pwrite safe against themselves, but not against
248 * normal read/write by using a mutex. slows down execution a lot,
249 * but that's your problem, not mine.
250 */
251static pthread_mutex_t iolock = PTHREAD_MUTEX_INITIALIZER;
136 252
137 if (dataoffset < 0 || dataoffset > svlen) 253static ssize_t
138 croak ("data offset outside of string"); 254pread (int fd, void *buf, size_t count, off_t offset)
255{
256 ssize_t res;
257 off_t ooffset;
139 258
140 if (dowrite) 259 pthread_mutex_lock (&iolock);
260 ooffset = lseek (fd, 0, SEEK_CUR);
261 lseek (fd, offset, SEEK_SET);
262 res = read (fd, buf, count);
263 lseek (fd, ooffset, SEEK_SET);
264 pthread_mutex_unlock (&iolock);
265
266 return res;
267}
268
269static ssize_t
270pwrite (int fd, void *buf, size_t count, off_t offset)
271{
272 ssize_t res;
273 off_t ooffset;
274
275 pthread_mutex_lock (&iolock);
276 ooffset = lseek (fd, 0, SEEK_CUR);
277 lseek (fd, offset, SEEK_SET);
278 res = write (fd, buf, count);
279 lseek (fd, offset, SEEK_SET);
280 pthread_mutex_unlock (&iolock);
281
282 return res;
283}
284#endif
285
286#if !HAVE_FDATASYNC
287# define fdatasync fsync
288#endif
289
290#if !HAVE_READAHEAD
291# define readahead aio_readahead
292
293static char readahead_buf[4096];
294
295static ssize_t
296readahead (int fd, off_t offset, size_t count)
297{
298 while (count > 0)
141 { 299 {
142 /* write: check length and adjust. */ 300 size_t len = count < sizeof (readahead_buf) ? count : sizeof (readahead_buf);
143 if (length < 0 || length + dataoffset > svlen) 301
144 length = svlen - dataoffset; 302 pread (fd, readahead_buf, len, offset);
303 offset += len;
304 count -= len;
145 } 305 }
146 else
147 {
148 /* read: grow scalar as necessary */
149 svptr = SvGROW (data, length + dataoffset);
150 }
151 306
152 if (length < 0) 307 errno = 0;
153 croak ("length must not be negative");
154
155 Newz (0, req, 1, aio_cb);
156
157 if (!req)
158 croak ("out of memory during aio_req allocation");
159
160 req->type = dowrite ? REQ_WRITE : REQ_READ;
161 req->fd = fd;
162 req->offset = offset;
163 req->length = length;
164 req->data = SvREFCNT_inc (data);
165 req->dataptr = (char *)svptr + dataoffset;
166 req->callback = SvREFCNT_inc (callback);
167
168 send_req (req);
169} 308}
170 309#endif
171static void
172poll_wait ()
173{
174 if (!nreqs)
175 return;
176
177 fd_set rfd;
178 FD_ZERO(&rfd);
179 FD_SET(respipe [0], &rfd);
180
181 select (respipe [0] + 1, &rfd, 0, 0, 0);
182}
183
184static int
185poll_cb (pTHX)
186{
187 dSP;
188 int count = 0;
189 aio_req req;
190
191 {
192 /* read and signals sent by the worker threads */
193 char buf [32];
194 while (read (respipe [0], buf, 32) > 0)
195 ;
196 }
197
198 for (;;)
199 {
200 pthread_mutex_lock (&reslock);
201
202 req = ress;
203
204 if (ress)
205 {
206 ress = ress->next;
207 if (!ress) rese = 0;
208 }
209
210 pthread_mutex_unlock (&reslock);
211
212 if (!req)
213 break;
214
215 nreqs--;
216
217 if (req->type == REQ_QUIT)
218 started--;
219 else
220 {
221 int errorno = errno;
222 errno = req->errorno;
223
224 if (req->type == REQ_READ)
225 SvCUR_set (req->data, req->dataoffset
226 + req->result > 0 ? req->result : 0);
227
228 if (req->data)
229 SvREFCNT_dec (req->data);
230
231 if (req->type == REQ_STAT || req->type == REQ_LSTAT || req->type == REQ_FSTAT)
232 {
233 PL_laststype = req->type == REQ_LSTAT ? OP_LSTAT : OP_STAT;
234 PL_laststatval = req->result;
235 PL_statcache = *(req->statdata);
236
237 Safefree (req->statdata);
238 }
239
240 PUSHMARK (SP);
241 XPUSHs (sv_2mortal (newSViv (req->result)));
242
243 if (req->type == REQ_OPEN)
244 {
245 /* convert fd to fh */
246 SV *fh;
247
248 PUTBACK;
249 call_pv ("IO::AIO::_fd2fh", G_SCALAR | G_EVAL);
250 SPAGAIN;
251
252 fh = POPs;
253
254 PUSHMARK (SP);
255 XPUSHs (fh);
256 }
257
258 PUTBACK;
259 call_sv (req->callback, G_VOID | G_EVAL);
260 SPAGAIN;
261
262 if (req->callback)
263 SvREFCNT_dec (req->callback);
264
265 errno = errorno;
266 count++;
267 }
268
269 Safefree (req);
270 }
271
272 return count;
273}
274 310
275static void * 311static void *
276aio_proc (void *thr_arg) 312aio_proc (void *thr_arg)
277{ 313{
278 aio_req req; 314 aio_req req;
304 340
305 type = req->type; 341 type = req->type;
306 342
307 switch (type) 343 switch (type)
308 { 344 {
309 case REQ_READ: req->result = pread64 (req->fd, req->dataptr, req->length, req->offset); break; 345 case REQ_READ: req->result = pread (req->fd, req->dataptr, req->length, req->offset); break;
310 case REQ_WRITE: req->result = pwrite64 (req->fd, req->dataptr, req->length, req->offset); break; 346 case REQ_WRITE: req->result = pwrite (req->fd, req->dataptr, req->length, req->offset); break;
311#if SYS_readahead 347
312 case REQ_READAHEAD: req->result = readahead (req->fd, req->offset, req->length); break; 348 case REQ_READAHEAD: req->result = readahead (req->fd, req->offset, req->length); break;
313#else
314 case REQ_READAHEAD: req->result = -1; errno = ENOSYS; break;
315#endif
316 349
317 case REQ_STAT: req->result = stat (req->dataptr, req->statdata); break; 350 case REQ_STAT: req->result = stat (req->dataptr, req->statdata); break;
318 case REQ_LSTAT: req->result = lstat (req->dataptr, req->statdata); break; 351 case REQ_LSTAT: req->result = lstat (req->dataptr, req->statdata); break;
319 case REQ_FSTAT: req->result = fstat (req->fd , req->statdata); break; 352 case REQ_FSTAT: req->result = fstat (req->fd , req->statdata); break;
320 353
321 case REQ_OPEN: req->result = open (req->dataptr, req->fd, req->mode); break; 354 case REQ_OPEN: req->result = open (req->dataptr, req->fd, req->mode); break;
322 case REQ_CLOSE: req->result = close (req->fd); break; 355 case REQ_CLOSE: req->result = close (req->fd); break;
323 case REQ_UNLINK: req->result = unlink (req->dataptr); break; 356 case REQ_UNLINK: req->result = unlink (req->dataptr); break;
324 357
358 case REQ_FDATASYNC: req->result = fdatasync (req->fd); break;
325 case REQ_FSYNC: req->result = fsync (req->fd); break; 359 case REQ_FSYNC: req->result = fsync (req->fd); break;
326 case REQ_FDATASYNC: req->result = fdatasync (req->fd); break;
327 360
328 case REQ_QUIT: 361 case REQ_QUIT:
329 break; 362 break;
330 363
331 default: 364 default:
359 return 0; 392 return 0;
360} 393}
361 394
362MODULE = IO::AIO PACKAGE = IO::AIO 395MODULE = IO::AIO PACKAGE = IO::AIO
363 396
397PROTOTYPES: ENABLE
398
364BOOT: 399BOOT:
365{ 400{
366 if (pipe (respipe)) 401 if (pipe (respipe))
367 croak ("unable to initialize result pipe"); 402 croak ("unable to initialize result pipe");
368 403
395 } 430 }
396 431
397 while (started > nthreads) 432 while (started > nthreads)
398 { 433 {
399 poll_wait (); 434 poll_wait ();
400 poll_cb (aTHX); 435 poll_cb ();
401 } 436 }
402} 437}
403 438
439int
440max_outstanding(nreqs)
441 int nreqs
442 PROTOTYPE: $
443 CODE:
444 RETVAL = max_outstanding;
445 max_outstanding = nreqs;
446
404void 447void
405aio_open(pathname,flags,mode,callback) 448aio_open(pathname,flags,mode,callback=&PL_sv_undef)
406 SV * pathname 449 SV * pathname
407 int flags 450 int flags
408 int mode 451 int mode
409 SV * callback 452 SV * callback
410 PROTOTYPE: $$$$ 453 PROTOTYPE: $$$;$
411 CODE: 454 CODE:
412{ 455{
413 aio_req req; 456 aio_req req;
414 457
415 Newz (0, req, 1, aio_cb); 458 Newz (0, req, 1, aio_cb);
426 469
427 send_req (req); 470 send_req (req);
428} 471}
429 472
430void 473void
431aio_close(fh,callback) 474aio_close(fh,callback=&PL_sv_undef)
432 InputStream fh 475 SV * fh
433 SV * callback 476 SV * callback
434 PROTOTYPE: $$ 477 PROTOTYPE: $;$
435 ALIAS: 478 ALIAS:
436 aio_close = REQ_CLOSE 479 aio_close = REQ_CLOSE
437 aio_fsync = REQ_FSYNC 480 aio_fsync = REQ_FSYNC
438 aio_fdatasync = REQ_FDATASYNC 481 aio_fdatasync = REQ_FDATASYNC
439 CODE: 482 CODE:
444 487
445 if (!req) 488 if (!req)
446 croak ("out of memory during aio_req allocation"); 489 croak ("out of memory during aio_req allocation");
447 490
448 req->type = ix; 491 req->type = ix;
492 req->fh = newSVsv (fh);
449 req->fd = PerlIO_fileno (fh); 493 req->fd = PerlIO_fileno (IoIFP (sv_2io (fh)));
450 req->callback = SvREFCNT_inc (callback); 494 req->callback = SvREFCNT_inc (callback);
451 495
452 send_req (req); 496 send_req (req);
453} 497}
454 498
455void 499void
456aio_read(fh,offset,length,data,dataoffset,callback) 500aio_read(fh,offset,length,data,dataoffset,callback=&PL_sv_undef)
457 InputStream fh 501 SV * fh
458 UV offset 502 UV offset
459 IV length 503 IV length
460 SV * data 504 SV * data
461 IV dataoffset 505 IV dataoffset
462 SV * callback 506 SV * callback
507 ALIAS:
508 aio_read = REQ_READ
509 aio_write = REQ_WRITE
463 PROTOTYPE: $$$$$$ 510 PROTOTYPE: $$$$$;$
464 CODE: 511 CODE:
465 read_write (aTHX_ 0, PerlIO_fileno (fh), offset, length, data, dataoffset, callback);
466
467void
468aio_write(fh,offset,length,data,dataoffset,callback)
469 OutputStream fh
470 UV offset
471 IV length
472 SV * data
473 IV dataoffset
474 SV * callback
475 PROTOTYPE: $$$$$$
476 CODE:
477 read_write (aTHX_ 1, PerlIO_fileno (fh), offset, length, data, dataoffset, callback);
478
479void
480aio_readahead(fh,offset,length,callback)
481 InputStream fh
482 UV offset
483 IV length
484 SV * callback
485 PROTOTYPE: $$$$
486 CODE:
487{ 512{
488 aio_req req; 513 aio_req req;
514 STRLEN svlen;
515 char *svptr = SvPV (data, svlen);
516
517 SvUPGRADE (data, SVt_PV);
518 SvPOK_on (data);
519
520 if (dataoffset < 0)
521 dataoffset += svlen;
522
523 if (dataoffset < 0 || dataoffset > svlen)
524 croak ("data offset outside of string");
525
526 if (ix == REQ_WRITE)
527 {
528 /* write: check length and adjust. */
529 if (length < 0 || length + dataoffset > svlen)
530 length = svlen - dataoffset;
531 }
532 else
533 {
534 /* read: grow scalar as necessary */
535 svptr = SvGROW (data, length + dataoffset);
536 }
489 537
490 if (length < 0) 538 if (length < 0)
491 croak ("length must not be negative"); 539 croak ("length must not be negative");
492 540
493 Newz (0, req, 1, aio_cb); 541 Newz (0, req, 1, aio_cb);
494 542
495 if (!req) 543 if (!req)
496 croak ("out of memory during aio_req allocation"); 544 croak ("out of memory during aio_req allocation");
497 545
546 req->type = ix;
547 req->fh = newSVsv (fh);
548 req->fd = PerlIO_fileno (ix == REQ_READ ? IoIFP (sv_2io (fh))
549 : IoOFP (sv_2io (fh)));
550 req->offset = offset;
551 req->length = length;
552 req->data = SvREFCNT_inc (data);
553 req->dataptr = (char *)svptr + dataoffset;
554 req->callback = SvREFCNT_inc (callback);
555
556 send_req (req);
557}
558
559void
560aio_readahead(fh,offset,length,callback=&PL_sv_undef)
561 SV * fh
562 UV offset
563 IV length
564 SV * callback
565 PROTOTYPE: $$$;$
566 CODE:
567{
568 aio_req req;
569
570 if (length < 0)
571 croak ("length must not be negative");
572
573 Newz (0, req, 1, aio_cb);
574
575 if (!req)
576 croak ("out of memory during aio_req allocation");
577
498 req->type = REQ_READAHEAD; 578 req->type = REQ_READAHEAD;
579 req->fh = newSVsv (fh);
499 req->fd = PerlIO_fileno (fh); 580 req->fd = PerlIO_fileno (IoIFP (sv_2io (fh)));
500 req->offset = offset; 581 req->offset = offset;
501 req->length = length; 582 req->length = length;
502 req->callback = SvREFCNT_inc (callback); 583 req->callback = SvREFCNT_inc (callback);
503 584
504 send_req (req); 585 send_req (req);
505} 586}
506 587
507void 588void
508aio_stat(fh_or_path,callback) 589aio_stat(fh_or_path,callback=&PL_sv_undef)
509 SV * fh_or_path 590 SV * fh_or_path
510 SV * callback 591 SV * callback
511 PROTOTYPE: $$
512 ALIAS: 592 ALIAS:
593 aio_stat = REQ_STAT
513 aio_lstat = 1 594 aio_lstat = REQ_LSTAT
514 CODE: 595 CODE:
515{ 596{
516 aio_req req; 597 aio_req req;
517 598
518 Newz (0, req, 1, aio_cb); 599 Newz (0, req, 1, aio_cb);
525 if (!req->statdata) 606 if (!req->statdata)
526 croak ("out of memory during aio_req->statdata allocation"); 607 croak ("out of memory during aio_req->statdata allocation");
527 608
528 if (SvPOK (fh_or_path)) 609 if (SvPOK (fh_or_path))
529 { 610 {
530 req->type = ix ? REQ_LSTAT : REQ_STAT; 611 req->type = ix;
531 req->data = newSVsv (fh_or_path); 612 req->data = newSVsv (fh_or_path);
532 req->dataptr = SvPV_nolen (req->data); 613 req->dataptr = SvPV_nolen (req->data);
533 } 614 }
534 else 615 else
535 { 616 {
536 req->type = REQ_FSTAT; 617 req->type = REQ_FSTAT;
618 req->fh = newSVsv (fh_or_path);
537 req->fd = PerlIO_fileno (IoIFP (sv_2io (fh_or_path))); 619 req->fd = PerlIO_fileno (IoIFP (sv_2io (fh_or_path)));
538 } 620 }
539 621
540 req->callback = SvREFCNT_inc (callback); 622 req->callback = SvREFCNT_inc (callback);
541 623
542 send_req (req); 624 send_req (req);
543} 625}
544 626
545void 627void
546aio_unlink(pathname,callback) 628aio_unlink(pathname,callback=&PL_sv_undef)
547 SV * pathname 629 SV * pathname
548 SV * callback 630 SV * callback
549 PROTOTYPE: $$
550 CODE: 631 CODE:
551{ 632{
552 aio_req req; 633 aio_req req;
553 634
554 Newz (0, req, 1, aio_cb); 635 Newz (0, req, 1, aio_cb);
562 req->callback = SvREFCNT_inc (callback); 643 req->callback = SvREFCNT_inc (callback);
563 644
564 send_req (req); 645 send_req (req);
565} 646}
566 647
648void
649flush()
650 PROTOTYPE:
651 CODE:
652 while (nreqs)
653 {
654 poll_wait ();
655 poll_cb ();
656 }
657
658void
659poll()
660 PROTOTYPE:
661 CODE:
662 if (nreqs)
663 {
664 poll_wait ();
665 poll_cb ();
666 }
667
567int 668int
568poll_fileno() 669poll_fileno()
569 PROTOTYPE: 670 PROTOTYPE:
570 CODE: 671 CODE:
571 RETVAL = respipe [0]; 672 RETVAL = respipe [0];
574 675
575int 676int
576poll_cb(...) 677poll_cb(...)
577 PROTOTYPE: 678 PROTOTYPE:
578 CODE: 679 CODE:
579 RETVAL = poll_cb (aTHX); 680 RETVAL = poll_cb ();
580 OUTPUT: 681 OUTPUT:
581 RETVAL 682 RETVAL
582 683
583void 684void
584poll_wait() 685poll_wait()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines