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.50 by root, Sun Oct 22 21:13:47 2006 UTC vs.
Revision 1.51 by root, Sun Oct 22 22:14:33 2006 UTC

270 270
271 PUTBACK; 271 PUTBACK;
272 call_sv (req->callback, G_VOID | G_EVAL); 272 call_sv (req->callback, G_VOID | G_EVAL);
273 SPAGAIN; 273 SPAGAIN;
274 274
275 FREETMPS;
276 LEAVE;
277
278 errno = errorno;
279
275 if (SvTRUE (ERRSV)) 280 if (SvTRUE (ERRSV))
276 { 281 {
277 req_free (req); 282 req_free (req);
278 croak (0); 283 croak (0);
279 } 284 }
280
281 FREETMPS;
282 LEAVE;
283
284 errno = errorno;
285} 285}
286 286
287static void req_free (aio_req req) 287static void req_free (aio_req req)
288{ 288{
289 if (req->grp) 289 if (req->grp)
832 832
833 pthread_mutex_lock (&reslock); 833 pthread_mutex_lock (&reslock);
834 834
835 req->next = 0; 835 req->next = 0;
836 836
837 printf ("queue rese %p\n", rese);//D
837 if (rese) 838 if (rese)
838 { 839 {
839 rese->next = req; 840 rese->next = req;
840 rese = req; 841 rese = req;
841 } 842 }
1305 } 1306 }
1306 } 1307 }
1307} 1308}
1308 1309
1309void 1310void
1311result (aio_req grp, ...)
1312 CODE:
1313{
1314 int i;
1315 AV *av = newAV ();
1316
1317 for (i = 1; i < items; ++i )
1318 av_push (av, newSVsv (ST (i)));
1319
1320 SvREFCNT_dec (grp->data);
1321 grp->data = (SV *)av;
1322}
1323
1324void
1310lock (aio_req grp) 1325lock (aio_req grp)
1311 CODE: 1326 CODE:
1312 ++grp->length; 1327 ++grp->length;
1313 1328
1314void 1329void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines