--- IO-AIO/AIO.xs 2008/05/11 19:11:05 1.119 +++ IO-AIO/AIO.xs 2008/05/13 18:50:27 1.121 @@ -82,11 +82,11 @@ #define AIO_REQ_KLASS "IO::AIO::REQ" #define AIO_GRP_KLASS "IO::AIO::GRP" -#define EIO_COMMON \ +#define EIO_REQ_MEMBERS \ SV *callback; \ SV *sv1, *sv2; \ STRLEN stroffset; \ - SV *self + SV *self; #include "libeio/eio.h" @@ -107,7 +107,7 @@ typedef eio_req *aio_req_ornot; static SV *on_next_submit; -static int next_pri = EIO_DEFAULT_PRI + EIO_PRI_BIAS; +static int next_pri = EIO_PRI_DEFAULT; static int max_outstanding; static int respipe_osf [2], respipe [2] = { -1, -1 }; @@ -445,7 +445,7 @@ #define dREQ \ aio_req req; \ int req_pri = next_pri; \ - next_pri = EIO_DEFAULT_PRI + EIO_PRI_BIAS; \ + next_pri = EIO_PRI_DEFAULT; \ \ if (SvOK (callback) && !SvROK (callback)) \ croak ("callback must be undef or of reference type"); \ @@ -789,13 +789,13 @@ if (SvPOK (req->sv1)) { - req->type = EIO_FCHMOD; - req->int1 = PerlIO_fileno (IoIFP (sv_2io (fh_or_path))); + req->type = ix; + req->ptr1 = SvPVbyte_nolen (req->sv1); } else { - req->type = ix; - req->ptr1 = SvPVbyte_nolen (req->sv1); + req->type = EIO_FCHMOD; + req->int1 = PerlIO_fileno (IoIFP (sv_2io (fh_or_path))); } REQ_SEND; @@ -919,12 +919,12 @@ aioreq_pri (int pri = 0) PROTOTYPE: ;$ CODE: - RETVAL = next_pri - EIO_PRI_BIAS; + RETVAL = next_pri; if (items > 0) { if (pri < EIO_PRI_MIN) pri = EIO_PRI_MIN; if (pri > EIO_PRI_MAX) pri = EIO_PRI_MAX; - next_pri = pri + EIO_PRI_BIAS; + next_pri = pri; } OUTPUT: RETVAL @@ -935,7 +935,7 @@ nice = next_pri - nice; if (nice < EIO_PRI_MIN) nice = EIO_PRI_MIN; if (nice > EIO_PRI_MAX) nice = EIO_PRI_MAX; - next_pri = nice + EIO_PRI_BIAS; + next_pri = nice; void flush ()