[fpc-pascal] syscalls and fpc

Vinzent Höfler JeLlyFish.software at gmx.net
Sun Feb 17 02:00:25 CET 2008


ik wrote:

> I think that the entire design of the Do_SysCall is malformed in the
> way it assumes the number of parameters and also the type of them, so
> as I asked before, how I can either call the syscall command without
> assembler, or how I can pass an array of const (prior to that I asked
> regarding array of TSysParam) to assembly if three is no other way to
> use syscall ?

{/= SigTimedWait =====================================================\}
{                                                                      }
{\====================================================================/}
function SigTimedWait (
       var SigSet  : BaseUnix.tSigSet;
           Info    : BaseUnix.pSigInfo;
       var TimeOut : BaseUnix.tTimeSpec) : BaseUnix.CInt; inline;
begin
    {$HINTS OFF} // I  fucking *know* that most conversions below are not
                 // portable,  so  there  is  no  need  for  the compiler
                 // telling  me  that  crap.  After all,  this portion is
                 // unportable code by design anyway. ;)
    exit (SysCall.Do_SysCall (
                SysCall.Syscall_Nr_RT_SigTimedWait,
                SysCall.tSysParam (@SigSet),
                SysCall.tSysParam (Info),
                SysCall.tSysParam (@Timeout),
                SysCall.tSysParam (KERNEL_EXPECTED_SIGSET_SIZE)));
    {$HINTS ON}
end {SigTimedWait};



More information about the fpc-pascal mailing list