X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/032918a6c416c779efb706d4d2530cee687ebfaa..6dc5aa808483fdb8531afc990f26f1138bf2ddac:/lcoreselect.pas?ds=inline diff --git a/lcoreselect.pas b/lcoreselect.pas index feb8ef8..38da6ba 100755 --- a/lcoreselect.pas +++ b/lcoreselect.pas @@ -64,7 +64,7 @@ type procedure processtimers;inline; var - tv ,tvnow : ttimeval ; + tvnow : ttimeval ; currenttimer : tltimer ; temptimer : tltimer ; @@ -90,9 +90,9 @@ end; procedure processasios(var fdsr,fdsw:fdset);//inline; var currentsocket : tlasio ; - tempsocket : tlasio ; socketcount : integer ; // for debugging perposes :) dw,bt:integer; + currentfdword:fdword; fd : integer; begin //writeln('entering processasios'); @@ -104,10 +104,11 @@ begin {------- test optimised loop} socketcount := 0; - for dw := (maxs shr 5) downto 0 do if (fdsr[dw] or fdsw[dw]) <> 0 then begin - for bt := 0 to 31 do if (fdsr[dw] or fdsw[dw]) and (1 shl bt) <> 0 then begin + for dw := (maxs shr fdwordshift) downto 0 do if (fdsr[dw] or fdsw[dw]) <> 0 then begin + currentfdword := (fdsr[dw] or fdsw[dw]); + for bt := fdwordmaxbit downto 0 do if currentfdword and (1 shl bt) <> 0 then begin inc(socketcount); - fd := dw shl 5 or bt; + fd := dw shl fdwordshift or bt; //writeln('reversing fd ',fd); currentsocket := fdreverse[fd]; {if not assigned(currentsocket) then raise exception.create('currentsocket not assigned');