--- IO-AIO/AIO.xs 2011/09/29 09:51:24 1.200 +++ IO-AIO/AIO.xs 2011/09/29 09:57:12 1.201 @@ -343,20 +343,23 @@ static void req_destroy (aio_req req); static void req_cancel (aio_req req); -static void want_poll (void) +static void +want_poll (void) { /* write a dummy byte to the pipe so fh becomes ready */ s_epipe_signal (&respipe); } -static void done_poll (void) +static void +done_poll (void) { /* read any signals sent by the worker threads */ s_epipe_drain (&respipe); } /* must be called at most once */ -static SV *req_sv (aio_req req, HV *stash) +static SV * +req_sv (aio_req req, HV *stash) { if (!req->self) { @@ -373,7 +376,8 @@ return sv_bless (newRV_noinc (newSViv ((long)wd)), aio_wd_stash); } -static aio_req SvAIO_REQ (SV *sv) +static aio_req +SvAIO_REQ (SV *sv) { MAGIC *mg; @@ -388,7 +392,8 @@ return mg ? (aio_req)mg->mg_ptr : 0; } -static aio_wd SvAIO_WD (SV *sv) +static aio_wd +SvAIO_WD (SV *sv) { if (!SvROK (sv) || SvSTASH (SvRV (sv)) != aio_wd_stash @@ -398,7 +403,8 @@ return (aio_wd)(long)SvIVX (SvRV (sv)); } -static void aio_grp_feed (aio_req grp) +static void +aio_grp_feed (aio_req grp) { if (grp->sv2 && SvOK (grp->sv2)) { @@ -416,7 +422,8 @@ } } -static void req_submit (eio_req *req) +static void +req_submit (eio_req *req) { eio_submit (req); @@ -433,7 +440,8 @@ } } -static int req_invoke (eio_req *req) +static int +req_invoke (eio_req *req) { if (req->flags & FLAG_SV2_RO_OFF) SvREADONLY_off (req->sv2); @@ -668,7 +676,8 @@ return !!SvTRUE (ERRSV); } -static void req_destroy (aio_req req) +static void +req_destroy (aio_req req) { if (req->self) { @@ -685,7 +694,8 @@ Safefree (req); } -static void req_cancel_subs (aio_req grp) +static void +req_cancel_subs (aio_req grp) { if (grp->type != EIO_GROUP) return; @@ -696,13 +706,15 @@ eio_grp_cancel (grp); } -static void create_respipe (void) +static void ecb_cold +create_respipe (void) { if (s_epipe_renew (&respipe)) croak ("IO::AIO: unable to initialize result pipe"); } -static void poll_wait (void) +static void +poll_wait (void) { while (eio_nreqs ()) { @@ -721,7 +733,8 @@ } } -static int poll_cb (void) +static int +poll_cb (void) { for (;;) { @@ -764,7 +777,8 @@ #define MMAP_MAGIC PERL_MAGIC_ext -static int mmap_free (pTHX_ SV *sv, MAGIC *mg) +static int ecb_cold +mmap_free (pTHX_ SV *sv, MAGIC *mg) { int old_errno = errno; munmap (mg->mg_ptr, (size_t)mg->mg_obj); @@ -790,7 +804,8 @@ /*****************************************************************************/ -static SV * get_cb (SV *cb_sv) +static SV * +get_cb (SV *cb_sv) { SvGETMAGIC (cb_sv); return SvOK (cb_sv) ? s_get_cv_croak (cb_sv) : 0; @@ -819,7 +834,7 @@ if (GIMME_V != G_VOID) \ XPUSHs (req_sv (req, aio_req_stash)); -static void +ecb_inline void req_set_path (aio_req req, SV *path, SV **wdsv, SV **pathsv, eio_wd *wd, void **ptr) { if (expect_false (SvROK (path))) @@ -846,13 +861,13 @@ *ptr = SvPVbyte_nolen (*pathsv); } -static void +static void ecb_noinline req_set_path1 (aio_req req, SV *path) { req_set_path (req, path, &req->sv1, &req->sv3, &req->wd, &req->ptr1); } -static void +static void ecb_noinline req_set_fh_or_path (aio_req req, int type_path, int type_fh, SV *fh_or_path) { SV *rv = SvROK (fh_or_path) ? SvRV (fh_or_path) : fh_or_path; @@ -872,7 +887,6 @@ req_set_path1 (req, fh_or_path); break; } - } MODULE = IO::AIO PACKAGE = IO::AIO