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.63 by root, Mon Oct 23 23:48:31 2006 UTC vs.
Revision 1.70 by root, Tue Oct 24 15:15:56 2006 UTC

1/* solaris */
2#define _POSIX_PTHREAD_SEMANTICS 1
3
1#if __linux 4#if __linux
2# define _GNU_SOURCE 5# define _GNU_SOURCE
3#endif 6#endif
4 7
5#define _REENTRANT 1 8#define _REENTRANT 1
46# define NAME_MAX 4096 49# define NAME_MAX 4096
47#endif 50#endif
48 51
49#if __ia64 52#if __ia64
50# define STACKSIZE 65536 53# define STACKSIZE 65536
54#elif __i386 || __x86_64 /* 16k is unreasonably high :( */
55# define STACKSIZE PTHREAD_STACK_MIN
51#else 56#else
52# define STACKSIZE 8192 57# define STACKSIZE 16384
53#endif 58#endif
59
60/* buffer size for various temporary buffers */
61#define AIO_BUFSIZE 65536
62
63#define dBUF \
64 char *aio_buf = malloc (AIO_BUFSIZE); \
65 if (!aio_buf) \
66 return -1;
67
68#define fBUF free (aio_buf)
54 69
55enum { 70enum {
56 REQ_QUIT, 71 REQ_QUIT,
57 REQ_OPEN, REQ_CLOSE, 72 REQ_OPEN, REQ_CLOSE,
58 REQ_READ, REQ_WRITE, REQ_READAHEAD, 73 REQ_READ, REQ_WRITE, REQ_READAHEAD,
61 REQ_FSYNC, REQ_FDATASYNC, 76 REQ_FSYNC, REQ_FDATASYNC,
62 REQ_UNLINK, REQ_RMDIR, REQ_RENAME, 77 REQ_UNLINK, REQ_RMDIR, REQ_RENAME,
63 REQ_READDIR, 78 REQ_READDIR,
64 REQ_LINK, REQ_SYMLINK, 79 REQ_LINK, REQ_SYMLINK,
65 REQ_GROUP, REQ_NOP, 80 REQ_GROUP, REQ_NOP,
66 REQ_SLEEP, 81 REQ_BUSY,
67}; 82};
68 83
69#define AIO_REQ_KLASS "IO::AIO::REQ" 84#define AIO_REQ_KLASS "IO::AIO::REQ"
70#define AIO_GRP_KLASS "IO::AIO::GRP" 85#define AIO_GRP_KLASS "IO::AIO::GRP"
71 86
105 PRI_MIN = -4, 120 PRI_MIN = -4,
106 PRI_MAX = 4, 121 PRI_MAX = 4,
107 122
108 DEFAULT_PRI = 0, 123 DEFAULT_PRI = 0,
109 PRI_BIAS = -PRI_MIN, 124 PRI_BIAS = -PRI_MIN,
125 NUM_PRI = PRI_MAX + PRI_BIAS + 1,
110}; 126};
111 127
112static int next_pri = DEFAULT_PRI + PRI_BIAS; 128static int next_pri = DEFAULT_PRI + PRI_BIAS;
113 129
114static int started, wanted; 130static int started, wanted;
124 140
125static pthread_mutex_t reslock = AIO_MUTEX_INIT; 141static pthread_mutex_t reslock = AIO_MUTEX_INIT;
126static pthread_mutex_t reqlock = AIO_MUTEX_INIT; 142static pthread_mutex_t reqlock = AIO_MUTEX_INIT;
127static pthread_cond_t reqwait = PTHREAD_COND_INITIALIZER; 143static pthread_cond_t reqwait = PTHREAD_COND_INITIALIZER;
128 144
129static volatile aio_req reqs, reqe; /* queue start, queue end */ 145/*
130static volatile aio_req ress, rese; /* queue start, queue end */ 146 * a somewhat faster data structure might be nice, but
147 * with 8 priorities this actually needs <20 insns
148 * per shift, the most expensive operation.
149 */
150typedef struct {
151 aio_req qs[NUM_PRI], qe[NUM_PRI]; /* qstart, qend */
152 int size;
153} reqq;
154
155static reqq req_queue;
156static reqq res_queue;
157
158int reqq_push (reqq *q, aio_req req)
159{
160 int pri = req->pri;
161 req->next = 0;
162
163 if (q->qe[pri])
164 {
165 q->qe[pri]->next = req;
166 q->qe[pri] = req;
167 }
168 else
169 q->qe[pri] = q->qs[pri] = req;
170
171 return q->size++;
172}
173
174aio_req reqq_shift (reqq *q)
175{
176 int pri;
177
178 if (!q->size)
179 return 0;
180
181 --q->size;
182
183 for (pri = NUM_PRI; pri--; )
184 {
185 aio_req req = q->qs[pri];
186
187 if (req)
188 {
189 if (!(q->qs[pri] = req->next))
190 q->qe[pri] = 0;
191
192 return req;
193 }
194 }
195
196 abort ();
197}
131 198
132static void req_invoke (aio_req req); 199static void req_invoke (aio_req req);
133static void req_free (aio_req req); 200static void req_free (aio_req req);
134 201
135/* must be called at most once */ 202/* must be called at most once */
169 ENTER; 236 ENTER;
170 SAVETMPS; 237 SAVETMPS;
171 PUSHMARK (SP); 238 PUSHMARK (SP);
172 XPUSHs (req_sv (grp, AIO_GRP_KLASS)); 239 XPUSHs (req_sv (grp, AIO_GRP_KLASS));
173 PUTBACK; 240 PUTBACK;
174 call_sv (grp->fh2, G_VOID | G_EVAL); 241 call_sv (grp->fh2, G_VOID | G_EVAL | G_KEEPERR);
175 SPAGAIN; 242 SPAGAIN;
176 FREETMPS; 243 FREETMPS;
177 LEAVE; 244 LEAVE;
178 } 245 }
179 246
206{ 273{
207 fd_set rfd; 274 fd_set rfd;
208 275
209 while (nreqs) 276 while (nreqs)
210 { 277 {
211 aio_req req; 278 int size;
279#if !(__i386 || __x86_64) /* safe without sempahore on this archs */
212 pthread_mutex_lock (&reslock); 280 pthread_mutex_lock (&reslock);
213 req = ress; 281#endif
282 size = res_queue.size;
283#if !(__i386 || __x86_64) /* safe without sempahore on this archs */
214 pthread_mutex_unlock (&reslock); 284 pthread_mutex_unlock (&reslock);
285#endif
215 286
216 if (req) 287 if (size)
217 return; 288 return;
218 289
219 FD_ZERO(&rfd); 290 FD_ZERO(&rfd);
220 FD_SET(respipe [0], &rfd); 291 FD_SET(respipe [0], &rfd);
221 292
224} 295}
225 296
226static void req_invoke (aio_req req) 297static void req_invoke (aio_req req)
227{ 298{
228 dSP; 299 dSP;
229 int errorno = errno;
230 300
231 if (req->flags & FLAG_CANCELLED || !SvOK (req->callback)) 301 if (!(req->flags & FLAG_CANCELLED) && SvOK (req->callback))
232 return; 302 {
233
234 errno = req->errorno; 303 errno = req->errorno;
235 304
236 ENTER; 305 ENTER;
237 SAVETMPS; 306 SAVETMPS;
238 PUSHMARK (SP); 307 PUSHMARK (SP);
239 EXTEND (SP, 1); 308 EXTEND (SP, 1);
240 309
241 switch (req->type) 310 switch (req->type)
242 {
243 case REQ_READDIR:
244 { 311 {
245 SV *rv = &PL_sv_undef; 312 case REQ_READDIR:
246
247 if (req->result >= 0)
248 { 313 {
249 char *buf = req->data2ptr; 314 SV *rv = &PL_sv_undef;
250 AV *av = newAV ();
251 315
252 while (req->result) 316 if (req->result >= 0)
253 { 317 {
318 char *buf = req->data2ptr;
319 AV *av = newAV ();
320
321 while (req->result)
322 {
254 SV *sv = newSVpv (buf, 0); 323 SV *sv = newSVpv (buf, 0);
255 324
256 av_push (av, sv); 325 av_push (av, sv);
257 buf += SvCUR (sv) + 1; 326 buf += SvCUR (sv) + 1;
258 req->result--; 327 req->result--;
328 }
329
330 rv = sv_2mortal (newRV_noinc ((SV *)av));
259 } 331 }
260 332
261 rv = sv_2mortal (newRV_noinc ((SV *)av)); 333 PUSHs (rv);
262 } 334 }
335 break;
263 336
264 PUSHs (rv); 337 case REQ_OPEN:
338 {
339 /* convert fd to fh */
340 SV *fh;
341
342 PUSHs (sv_2mortal (newSViv (req->result)));
343 PUTBACK;
344 call_pv ("IO::AIO::_fd2fh", G_SCALAR | G_EVAL);
345 SPAGAIN;
346
347 fh = SvREFCNT_inc (POPs);
348
349 PUSHMARK (SP);
350 XPUSHs (sv_2mortal (fh));
351 }
352 break;
353
354 case REQ_GROUP:
355 req->fd = 2; /* mark group as finished */
356
357 if (req->data)
358 {
359 int i;
360 AV *av = (AV *)req->data;
361
362 EXTEND (SP, AvFILL (av) + 1);
363 for (i = 0; i <= AvFILL (av); ++i)
364 PUSHs (*av_fetch (av, i, 0));
365 }
366 break;
367
368 case REQ_NOP:
369 case REQ_BUSY:
370 break;
371
372 default:
373 PUSHs (sv_2mortal (newSViv (req->result)));
374 break;
265 } 375 }
266 break;
267 376
268 case REQ_OPEN:
269 {
270 /* convert fd to fh */
271 SV *fh;
272 377
273 PUSHs (sv_2mortal (newSViv (req->result)));
274 PUTBACK; 378 PUTBACK;
275 call_pv ("IO::AIO::_fd2fh", G_SCALAR | G_EVAL);
276 SPAGAIN;
277
278 fh = SvREFCNT_inc (POPs);
279
280 PUSHMARK (SP);
281 XPUSHs (sv_2mortal (fh));
282 }
283 break;
284
285 case REQ_GROUP:
286 req->fd = 2; /* mark group as finished */
287
288 if (req->data)
289 {
290 int i;
291 AV *av = (AV *)req->data;
292
293 EXTEND (SP, AvFILL (av) + 1);
294 for (i = 0; i <= AvFILL (av); ++i)
295 PUSHs (*av_fetch (av, i, 0));
296 }
297 break;
298
299 case REQ_NOP:
300 case REQ_SLEEP:
301 break;
302
303 default:
304 PUSHs (sv_2mortal (newSViv (req->result)));
305 break;
306 }
307
308
309 PUTBACK;
310 call_sv (req->callback, G_VOID | G_EVAL); 379 call_sv (req->callback, G_VOID | G_EVAL);
311 SPAGAIN; 380 SPAGAIN;
312 381
313 FREETMPS; 382 FREETMPS;
314 LEAVE; 383 LEAVE;
315
316 errno = errorno;
317
318 if (SvTRUE (ERRSV))
319 { 384 }
320 req_free (req);
321 croak (0);
322 }
323}
324 385
325static void req_free (aio_req req)
326{
327 if (req->grp) 386 if (req->grp)
328 { 387 {
329 aio_req grp = req->grp; 388 aio_req grp = req->grp;
330 389
331 /* unlink request */ 390 /* unlink request */
336 grp->grp_first = req->grp_next; 395 grp->grp_first = req->grp_next;
337 396
338 aio_grp_dec (grp); 397 aio_grp_dec (grp);
339 } 398 }
340 399
400 if (SvTRUE (ERRSV))
401 {
402 req_free (req);
403 croak (0);
404 }
405}
406
407static void req_free (aio_req req)
408{
341 if (req->self) 409 if (req->self)
342 { 410 {
343 sv_unmagic (req->self, PERL_MAGIC_ext); 411 sv_unmagic (req->self, PERL_MAGIC_ext);
344 SvREFCNT_dec (req->self); 412 SvREFCNT_dec (req->self);
345 } 413 }
377 aio_req req; 445 aio_req req;
378 446
379 for (;;) 447 for (;;)
380 { 448 {
381 pthread_mutex_lock (&reslock); 449 pthread_mutex_lock (&reslock);
382 req = ress; 450 req = reqq_shift (&res_queue);
383 451
384 if (req) 452 if (req)
385 { 453 {
386 ress = req->next;
387
388 if (!ress) 454 if (!res_queue.size)
389 { 455 {
390 /* read any signals sent by the worker threads */ 456 /* read any signals sent by the worker threads */
391 char buf [32]; 457 char buf [32];
392 while (read (respipe [0], buf, 32) == 32) 458 while (read (respipe [0], buf, 32) == 32)
393 ; 459 ;
394
395 rese = 0;
396 } 460 }
397 } 461 }
398 462
399 pthread_mutex_unlock (&reslock); 463 pthread_mutex_unlock (&reslock);
400 464
463 start_thread (); 527 start_thread ();
464 528
465 ++nreqs; 529 ++nreqs;
466 530
467 pthread_mutex_lock (&reqlock); 531 pthread_mutex_lock (&reqlock);
468 532 reqq_push (&req_queue, req);
469 req->next = 0;
470
471 if (reqe)
472 {
473 reqe->next = req;
474 reqe = req;
475 }
476 else
477 reqe = reqs = req;
478
479 pthread_cond_signal (&reqwait); 533 pthread_cond_signal (&reqwait);
480 pthread_mutex_unlock (&reqlock); 534 pthread_mutex_unlock (&reqlock);
481 535
482 if (nreqs > max_outstanding) 536 if (nreqs > max_outstanding)
483 for (;;) 537 for (;;)
492} 546}
493 547
494static void end_thread (void) 548static void end_thread (void)
495{ 549{
496 aio_req req; 550 aio_req req;
551
497 Newz (0, req, 1, aio_cb); 552 Newz (0, req, 1, aio_cb);
553
498 req->type = REQ_QUIT; 554 req->type = REQ_QUIT;
555 req->pri = PRI_MAX + PRI_BIAS;
499 556
500 req_send (req); 557 req_send (req);
501} 558}
502 559
503static void min_parallel (int nthreads) 560static void min_parallel (int nthreads)
590#if !HAVE_READAHEAD 647#if !HAVE_READAHEAD
591# define readahead aio_readahead 648# define readahead aio_readahead
592 649
593static ssize_t readahead (int fd, off_t offset, size_t count) 650static ssize_t readahead (int fd, off_t offset, size_t count)
594{ 651{
595 char readahead_buf[4096]; 652 dBUF;
596 653
597 while (count > 0) 654 while (count > 0)
598 { 655 {
599 size_t len = count < sizeof (readahead_buf) ? count : sizeof (readahead_buf); 656 size_t len = count < AIO_BUFSIZE ? count : AIO_BUFSIZE;
600 657
601 pread (fd, readahead_buf, len, offset); 658 pread (fd, aio_buf, len, offset);
602 offset += len; 659 offset += len;
603 count -= len; 660 count -= len;
604 } 661 }
662
663 fBUF;
605 664
606 errno = 0; 665 errno = 0;
607} 666}
608#endif 667#endif
609 668
695#endif 754#endif
696 ) 755 )
697 ) 756 )
698 { 757 {
699 /* emulate sendfile. this is a major pain in the ass */ 758 /* emulate sendfile. this is a major pain in the ass */
700 char buf[4096]; 759 dBUF;
760
701 res = 0; 761 res = 0;
702 762
703 while (count) 763 while (count)
704 { 764 {
705 ssize_t cnt; 765 ssize_t cnt;
706 766
707 cnt = pread (ifd, buf, count > 4096 ? 4096 : count, offset); 767 cnt = pread (ifd, aio_buf, count > AIO_BUFSIZE ? AIO_BUFSIZE : count, offset);
708 768
709 if (cnt <= 0) 769 if (cnt <= 0)
710 { 770 {
711 if (cnt && !res) res = -1; 771 if (cnt && !res) res = -1;
712 break; 772 break;
713 } 773 }
714 774
715 cnt = write (ofd, buf, cnt); 775 cnt = write (ofd, aio_buf, cnt);
716 776
717 if (cnt <= 0) 777 if (cnt <= 0)
718 { 778 {
719 if (cnt && !res) res = -1; 779 if (cnt && !res) res = -1;
720 break; 780 break;
722 782
723 offset += cnt; 783 offset += cnt;
724 res += cnt; 784 res += cnt;
725 count -= cnt; 785 count -= cnt;
726 } 786 }
787
788 fBUF;
727 } 789 }
728 790
729 return res; 791 return res;
730} 792}
731 793
732/* read a full directory */ 794/* read a full directory */
733static int scandir_ (const char *path, void **namesp) 795static int scandir_ (const char *path, void **namesp)
734{ 796{
735 DIR *dirp = opendir (path); 797 DIR *dirp;
736 union 798 union
737 { 799 {
738 struct dirent d; 800 struct dirent d;
739 char b [offsetof (struct dirent, d_name) + NAME_MAX + 1]; 801 char b [offsetof (struct dirent, d_name) + NAME_MAX + 1];
740 } u; 802 } *u;
741 struct dirent *entp; 803 struct dirent *entp;
742 char *name, *names; 804 char *name, *names;
743 int memlen = 4096; 805 int memlen = 4096;
744 int memofs = 0; 806 int memofs = 0;
745 int res = 0; 807 int res = 0;
746 int errorno; 808 int errorno;
747 809
810 dirp = opendir (path);
748 if (!dirp) 811 if (!dirp)
749 return -1; 812 return -1;
750 813
814 u = malloc (sizeof (*u));
751 names = malloc (memlen); 815 names = malloc (memlen);
752 816
817 if (u && names)
753 for (;;) 818 for (;;)
754 { 819 {
820 errno = 0;
755 errno = 0, readdir_r (dirp, &u.d, &entp); 821 readdir_r (dirp, &u->d, &entp);
756 822
757 if (!entp) 823 if (!entp)
758 break; 824 break;
759 825
760 name = entp->d_name; 826 name = entp->d_name;
761 827
762 if (name [0] != '.' || (name [1] && (name [1] != '.' || name [2]))) 828 if (name [0] != '.' || (name [1] && (name [1] != '.' || name [2])))
763 { 829 {
764 int len = strlen (name) + 1; 830 int len = strlen (name) + 1;
765 831
766 res++; 832 res++;
767 833
768 while (memofs + len > memlen) 834 while (memofs + len > memlen)
769 { 835 {
770 memlen *= 2; 836 memlen *= 2;
771 names = realloc (names, memlen); 837 names = realloc (names, memlen);
772 if (!names) 838 if (!names)
773 break; 839 break;
774 } 840 }
775 841
776 memcpy (names + memofs, name, len); 842 memcpy (names + memofs, name, len);
777 memofs += len; 843 memofs += len;
778 } 844 }
779 } 845 }
780 846
781 errorno = errno; 847 errorno = errno;
848 free (u);
782 closedir (dirp); 849 closedir (dirp);
783 850
784 if (errorno) 851 if (errorno)
785 { 852 {
786 free (names); 853 free (names);
803 { 870 {
804 pthread_mutex_lock (&reqlock); 871 pthread_mutex_lock (&reqlock);
805 872
806 for (;;) 873 for (;;)
807 { 874 {
808 req = reqs; 875 req = reqq_shift (&req_queue);
809
810 if (reqs)
811 {
812 reqs = reqs->next;
813 if (!reqs) reqe = 0;
814 }
815 876
816 if (req) 877 if (req)
817 break; 878 break;
818 879
819 pthread_cond_wait (&reqwait, &reqlock); 880 pthread_cond_wait (&reqwait, &reqlock);
847 908
848 case REQ_FDATASYNC: req->result = fdatasync (req->fd); break; 909 case REQ_FDATASYNC: req->result = fdatasync (req->fd); break;
849 case REQ_FSYNC: req->result = fsync (req->fd); break; 910 case REQ_FSYNC: req->result = fsync (req->fd); break;
850 case REQ_READDIR: req->result = scandir_ (req->dataptr, &req->data2ptr); break; 911 case REQ_READDIR: req->result = scandir_ (req->dataptr, &req->data2ptr); break;
851 912
852 case REQ_SLEEP: 913 case REQ_BUSY:
853 { 914 {
854 struct timeval tv; 915 struct timeval tv;
855 916
856 tv.tv_sec = req->fd; 917 tv.tv_sec = req->fd;
857 tv.tv_usec = req->fd2; 918 tv.tv_usec = req->fd2;
871 932
872 req->errorno = errno; 933 req->errorno = errno;
873 934
874 pthread_mutex_lock (&reslock); 935 pthread_mutex_lock (&reslock);
875 936
876 req->next = 0; 937 if (!reqq_push (&res_queue, req))
877
878 if (rese)
879 {
880 rese->next = req;
881 rese = req;
882 }
883 else
884 {
885 rese = ress = req;
886
887 /* write a dummy byte to the pipe so fh becomes ready */ 938 /* write a dummy byte to the pipe so fh becomes ready */
888 write (respipe [1], &respipe, 1); 939 write (respipe [1], &respipe, 1);
889 }
890 940
891 pthread_mutex_unlock (&reslock); 941 pthread_mutex_unlock (&reslock);
892 } 942 }
893 while (type != REQ_QUIT); 943 while (type != REQ_QUIT);
894 944
925{ 975{
926 aio_req prv; 976 aio_req prv;
927 977
928 started = 0; 978 started = 0;
929 979
930 while (reqs) 980 while (prv = reqq_shift (&req_queue))
931 {
932 prv = reqs;
933 reqs = prv->next;
934 req_free (prv); 981 req_free (prv);
935 }
936 982
937 reqs = reqe = 0; 983 while (prv = reqq_shift (&res_queue))
938
939 while (ress)
940 {
941 prv = ress;
942 ress = prv->next;
943 req_free (prv); 984 req_free (prv);
944 } 985
945
946 ress = rese = 0;
947
948 close (respipe [0]); 986 close (respipe [0]);
949 close (respipe [1]); 987 close (respipe [1]);
950 create_pipe (); 988 create_pipe ();
951 989
952 atfork_parent (); 990 atfork_parent ();
1227 1265
1228 REQ_SEND; 1266 REQ_SEND;
1229} 1267}
1230 1268
1231void 1269void
1232aio_sleep (delay,callback=&PL_sv_undef) 1270aio_busy (delay,callback=&PL_sv_undef)
1233 double delay 1271 double delay
1234 SV * callback 1272 SV * callback
1235 PPCODE: 1273 PPCODE:
1236{ 1274{
1237 dREQ; 1275 dREQ;
1238 1276
1239 req->type = REQ_SLEEP; 1277 req->type = REQ_BUSY;
1240 req->fd = delay < 0. ? 0 : delay; 1278 req->fd = delay < 0. ? 0 : delay;
1241 req->fd2 = delay < 0. ? 0 : 1000. * (delay - req->fd); 1279 req->fd2 = delay < 0. ? 0 : 1000. * (delay - req->fd);
1242 1280
1243 REQ_SEND; 1281 REQ_SEND;
1244} 1282}
1267 req->type = REQ_NOP; 1305 req->type = REQ_NOP;
1268 1306
1269 REQ_SEND; 1307 REQ_SEND;
1270} 1308}
1271 1309
1272#if 0
1273
1274void 1310void
1275aio_pri (int pri = DEFAULT_PRI) 1311aioreq_pri (int pri = DEFAULT_PRI)
1276 CODE: 1312 CODE:
1277 if (pri < PRI_MIN) pri = PRI_MIN; 1313 if (pri < PRI_MIN) pri = PRI_MIN;
1278 if (pri > PRI_MAX) pri = PRI_MAX; 1314 if (pri > PRI_MAX) pri = PRI_MAX;
1279 next_pri = pri + PRI_BIAS; 1315 next_pri = pri + PRI_BIAS;
1280 1316
1281#endif 1317void
1318aioreq_nice (int nice = 0)
1319 CODE:
1320 nice = next_pri - nice;
1321 if (nice < PRI_MIN) nice = PRI_MIN;
1322 if (nice > PRI_MAX) nice = PRI_MAX;
1323 next_pri = nice + PRI_BIAS;
1282 1324
1283void 1325void
1284flush () 1326flush ()
1285 PROTOTYPE: 1327 PROTOTYPE:
1286 CODE: 1328 CODE:
1335 1377
1336MODULE = IO::AIO PACKAGE = IO::AIO::REQ 1378MODULE = IO::AIO PACKAGE = IO::AIO::REQ
1337 1379
1338void 1380void
1339cancel (aio_req_ornot req) 1381cancel (aio_req_ornot req)
1340 PROTOTYPE:
1341 CODE: 1382 CODE:
1342 req_cancel (req); 1383 req_cancel (req);
1343 1384
1344void 1385void
1345cb (aio_req_ornot req, SV *callback=&PL_sv_undef) 1386cb (aio_req_ornot req, SV *callback=&PL_sv_undef)
1395 SvREFCNT_dec (grp->data); 1436 SvREFCNT_dec (grp->data);
1396 grp->data = (SV *)av; 1437 grp->data = (SV *)av;
1397} 1438}
1398 1439
1399void 1440void
1400feed_limit (aio_req grp, int limit) 1441limit (aio_req grp, int limit)
1401 CODE: 1442 CODE:
1402 grp->fd2 = limit; 1443 grp->fd2 = limit;
1403 aio_grp_feed (grp); 1444 aio_grp_feed (grp);
1404 1445
1405void 1446void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines