* moved sigprocmask to system

This commit is contained in:
marco 2003-10-26 17:01:04 +00:00
parent c8e23c4e58
commit 16c7ca4606
4 changed files with 48 additions and 21 deletions

View File

@ -45,21 +45,6 @@ begin
// Kill:=0;
end;
function FPSigProcMask(how:cint;nset : psigset;oset : psigset):cint; [public, alias : 'FPC_SYSC_SIGPROCMASK'];
{
Change the list of currently blocked signals.
How determines which signals will be blocked :
SigBlock : Add SSet to the current list of blocked signals
SigUnBlock : Remove the signals in SSet from the list of blocked signals.
SigSetMask : Set the list of blocked signals to SSet
if OldSSet is non-null, the old set will be saved there.
}
begin
FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,longint(how),longint(nset),longint(oset));
end;
Function FPSigPending(var nset: sigset_t):cint;
{
Allows examination of pending signals. The signal mask of pending
@ -469,7 +454,10 @@ end;
{
$Log$
Revision 1.4 2003-09-27 13:45:58 peter
Revision 1.5 2003-10-26 17:01:04 marco
* moved sigprocmask to system
Revision 1.4 2003/09/27 13:45:58 peter
* fpnanosleep exported in baseunix
* fpnanosleep has pointer arguments to be C compliant

View File

@ -492,6 +492,21 @@ end;
SystemUnit Initialization
*****************************************************************************}
function reenable_signal(sig : longint) : boolean;
var
e,oe : TSigSet;
i,j : byte;
begin
fillchar(e,sizeof(e),#0);
fillchar(oe,sizeof(oe),#0);
{ set is 1 based PM }
dec(sig);
i:=sig mod 32;
j:=sig div 32;
e[j]:=1 shl i;
fpsigprocmask(SIG_UNBLOCK,@e,@oe);
reenable_signal:=geterrno=0;
end;
procedure SignalToRunerror(signo: cint); cdecl;
var
@ -613,7 +628,10 @@ End.
{
$Log$
Revision 1.3 2003-09-27 13:04:58 peter
Revision 1.4 2003-10-26 17:01:04 marco
* moved sigprocmask to system
Revision 1.3 2003/09/27 13:04:58 peter
* fpISxxx renamed
Revision 1.2 2003/05/29 20:54:09 marco

View File

@ -532,6 +532,21 @@ begin
fpgettimeofday:=do_syscall(syscall_nr_gettimeofday,TSysParam(tp),TSysParam(tzp));
end;
function FPSigProcMask(how:cint;nset : psigset;oset : psigset):cint; [public, alias : 'FPC_SYSC_SIGPROCMASK'];
{
Change the list of currently blocked signals.
How determines which signals will be blocked :
SigBlock : Add SSet to the current list of blocked signals
SigUnBlock : Remove the signals in SSet from the list of blocked signals.
SigSetMask : Set the list of blocked signals to SSet
if OldSSet is non-null, the old set will be saved there.
}
begin
FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,longint(how),longint(nset),longint(oset));
end;
Function FpNanoSleep(req : ptimespec;rem : ptimespec) : cint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
begin
{$ifndef darwin}
@ -599,7 +614,10 @@ end;
{
$Log$
Revision 1.13 2003-10-17 22:10:30 olle
Revision 1.14 2003-10-26 17:01:04 marco
* moved sigprocmask to system
Revision 1.13 2003/10/17 22:10:30 olle
* changed i386 to cpui386
Revision 1.12 2003/09/27 13:45:58 peter

View File

@ -29,14 +29,14 @@ Unit {$ifdef VER1_0}Syslinux{$else}System{$endif};
Interface
{$I sysunixh.inc}
{$define FPC_USE_SIGPROCMASK}
{$define FPC_USE_SIGALTSTACK}
CONST SIGSTKSZ = 40960;
{$I sysunixh.inc}
Implementation
Var Errno : longint;
@ -108,7 +108,10 @@ End.
{
$Log$
Revision 1.9 2003-10-26 16:42:22 marco
Revision 1.10 2003-10-26 17:01:04 marco
* moved sigprocmask to system
Revision 1.9 2003/10/26 16:42:22 marco
* texception4 fix merge
Revision 1.8 2003/01/05 19:01:28 marco