X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/032918a6c416c779efb706d4d2530cee687ebfaa..3124451e3e3e632e45928b7d28e3b2bff06e1879:/lcoreselect.pas?ds=sidebyside diff --git a/lcoreselect.pas b/lcoreselect.pas index feb8ef8..659bfce 100755 --- a/lcoreselect.pas +++ b/lcoreselect.pas @@ -93,6 +93,7 @@ var tempsocket : tlasio ; socketcount : integer ; // for debugging perposes :) dw,bt:integer; + currentfdword:fdword; fd : integer; begin //writeln('entering processasios'); @@ -104,10 +105,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');