mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 09:39:09 +02:00
* Simplified and fixed (previous mistake..) select/newselect
git-svn-id: trunk@2885 -
This commit is contained in:
parent
8924d3f37a
commit
4afe7ef0c9
@ -393,37 +393,14 @@ Function fpSelect(N:cint;readfds,writefds,exceptfds:pfdSet;TimeOut:PTimeVal):cin
|
|||||||
have changed.
|
have changed.
|
||||||
}
|
}
|
||||||
|
|
||||||
{$ifdef cpui386}
|
|
||||||
Var
|
|
||||||
SelectArray : Array[1..5] of TSysParam;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef cpui386}
|
|
||||||
{$define bunxfunc_fpselect_implemented}
|
|
||||||
SelectArray[1]:=n;
|
|
||||||
SelectArray[2]:=TSysParam(Readfds);
|
|
||||||
Selectarray[3]:=TSysParam(Writefds);
|
|
||||||
selectarray[4]:=TSysParam(exceptfds);
|
|
||||||
Selectarray[5]:=TSysParam(TimeOut);
|
|
||||||
fpSelect:=do_syscall(syscall_nr_select,TSysParam(@selectarray));
|
|
||||||
{$endif cpui386}
|
|
||||||
{$ifdef cpux86_64}
|
{$ifdef cpux86_64}
|
||||||
{$define bunxfunc_fpselect_implemented}
|
{$define bunxfunc_fpselect_implemented}
|
||||||
fpSelect:=do_syscall(syscall_nr__newselect,n,tsysparam(readfds),tsysparam(writefds),tsysparam(exceptfds),tsysparam(timeout));
|
fpSelect:=do_syscall(syscall_nr_select,n,tsysparam(readfds),tsysparam(writefds),tsysparam(exceptfds),tsysparam(timeout));
|
||||||
{$endif cpux86_64}
|
{$else}
|
||||||
{$ifdef cpuarm}
|
|
||||||
{$define bunxfunc_fpselect_implemented}
|
{$define bunxfunc_fpselect_implemented}
|
||||||
fpSelect:=do_syscall(syscall_nr__newselect,n,tsysparam(readfds),tsysparam(writefds),tsysparam(exceptfds),tsysparam(timeout));
|
fpSelect:=do_syscall(syscall_nr__newselect,n,tsysparam(readfds),tsysparam(writefds),tsysparam(exceptfds),tsysparam(timeout));
|
||||||
{$endif cpuarm}
|
{$endif}
|
||||||
{$ifdef cpupowerpc}
|
|
||||||
{$define bunxfunc_fpselect_implemented}
|
|
||||||
fpSelect:=do_syscall(syscall_nr__newselect,n,tsysparam(readfds),tsysparam(writefds),tsysparam(exceptfds),tsysparam(timeout));
|
|
||||||
{$endif cpupowerpc}
|
|
||||||
{$ifdef cpusparc}
|
|
||||||
{$define bunxfunc_fpselect_implemented}
|
|
||||||
fpSelect:=do_syscall(syscall_nr__newselect,n,tsysparam(readfds),tsysparam(writefds),tsysparam(exceptfds),tsysparam(timeout));
|
|
||||||
{$endif cpusparc}
|
|
||||||
{$ifndef bunxfunc_fpselect_implemented}
|
{$ifndef bunxfunc_fpselect_implemented}
|
||||||
{$error Implement fpselect}
|
{$error Implement fpselect}
|
||||||
{$endif bunxfunc_fpselect_implemented}
|
{$endif bunxfunc_fpselect_implemented}
|
||||||
|
Loading…
Reference in New Issue
Block a user