X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/4782a5c5afee47721cc617daa40dd29828342c2b..0a9944546bc1cf591dfce10112a4385049909f02:/lcoreselect.pas?ds=sidebyside diff --git a/lcoreselect.pas b/lcoreselect.pas index e0351eb..0d99f6a 100755 --- a/lcoreselect.pas +++ b/lcoreselect.pas @@ -6,12 +6,12 @@ For conditions of distribution and use, see copyright notice in zlib_license.txt which is included in the package ----------------------------------------------------------------------------- } - -{$ifdef fpc} - {$ifndef ver1_0} - {$define useinline} - {$endif} -{$endif} + +{$ifdef fpc} + {$ifndef ver1_0} + {$define useinline} + {$endif} +{$endif} unit lcoreselect; @@ -41,8 +41,12 @@ uses {$include unixstuff.inc} {$include ltimevalstuff.inc} + +const + absoloutemaxs_select = (sizeof(fdset)*8)-1; + var - fdreverse:array[0..absoloutemaxs] of tlasio; + fdreverse:array[0..absoloutemaxs_select] of tlasio; type tselecteventcore=class(teventcore) public @@ -209,7 +213,7 @@ var var fdsrmaster , fdswmaster : fdset ; - + function getfdsrmaster : fdset; {$ifdef fpc}inline;{$endif} begin result := fdsrmaster; @@ -218,8 +222,8 @@ function getfdswmaster : fdset; {$ifdef fpc}inline;{$endif} begin result := fdswmaster; end; - - + + Function doSelect(timeOut:PTimeVal):longint;//inline; var localtimeval : ttimeval; @@ -393,6 +397,8 @@ end; begin eventcore := tselecteventcore.create; + absoloutemaxs := absoloutemaxs_select; + maxs := 0; fd_zero(fdsrmaster); fd_zero(fdswmaster);