mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 19:49:22 +02:00
* OpenBSD uses a special sigprocmask syscall
git-svn-id: trunk@20900 -
This commit is contained in:
parent
a680c4f1d6
commit
e3aabfec79
@ -480,8 +480,28 @@ function FPSigProcMask(how:cint;nset : psigset;oset : psigset):cint; [public, al
|
|||||||
if OldSSet is non-null, the old set will be saved there.
|
if OldSSet is non-null, the old set will be saved there.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{$ifdef OpenBSD}
|
||||||
|
{ OpenBSD sigprocmask signal uses
|
||||||
|
sigset_t that are cint type
|
||||||
|
the value of nset^[0] must be passed as second parameter
|
||||||
|
the old mask value is in return value }
|
||||||
|
{ How do we know if the call failed... PM }
|
||||||
|
{$define OS_SIGPROCMASK_RETURNS_OVAL}
|
||||||
|
{$endif}
|
||||||
|
{$ifdef OS_SIGPROCMASK_RETURNS_OVAL}
|
||||||
|
var
|
||||||
|
res : cint;
|
||||||
|
{$endif OS_SIGPROCMASK_RETURNS_OVAL}
|
||||||
begin
|
begin
|
||||||
|
{$ifdef OS_SIGPROCMASK_RETURNS_OVAL}
|
||||||
|
res:=do_syscall(syscall_nr_sigprocmask,tsysparam(how),TSysParam(nset^[0]));
|
||||||
|
if assigned(oset) then
|
||||||
|
oset^[0]:=res;
|
||||||
|
FPsigprocmask:=0;
|
||||||
|
|
||||||
|
{$else OS_SIGPROCMASK_RETURNS_OVAL}
|
||||||
FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,tsysparam(how),TSysParam(nset),TSysParam(oset));
|
FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,tsysparam(how),TSysParam(nset),TSysParam(oset));
|
||||||
|
{$endif OS_SIGPROCMASK_RETURNS_OVAL}
|
||||||
end;
|
end;
|
||||||
{$user BLA!}
|
{$user BLA!}
|
||||||
Function FpNanoSleep(req : ptimespec;rem : ptimespec) : cint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
|
Function FpNanoSleep(req : ptimespec;rem : ptimespec) : cint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
|
||||||
|
Loading…
Reference in New Issue
Block a user