mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 15:32:06 +02:00
* moved sigprocmask to system
This commit is contained in:
parent
c8e23c4e58
commit
16c7ca4606
@ -45,21 +45,6 @@ begin
|
|||||||
// Kill:=0;
|
// Kill:=0;
|
||||||
end;
|
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;
|
Function FPSigPending(var nset: sigset_t):cint;
|
||||||
{
|
{
|
||||||
Allows examination of pending signals. The signal mask of pending
|
Allows examination of pending signals. The signal mask of pending
|
||||||
@ -469,7 +454,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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 exported in baseunix
|
||||||
* fpnanosleep has pointer arguments to be C compliant
|
* fpnanosleep has pointer arguments to be C compliant
|
||||||
|
|
||||||
|
@ -492,6 +492,21 @@ end;
|
|||||||
SystemUnit Initialization
|
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;
|
procedure SignalToRunerror(signo: cint); cdecl;
|
||||||
var
|
var
|
||||||
@ -613,7 +628,10 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* fpISxxx renamed
|
||||||
|
|
||||||
Revision 1.2 2003/05/29 20:54:09 marco
|
Revision 1.2 2003/05/29 20:54:09 marco
|
||||||
|
@ -532,6 +532,21 @@ begin
|
|||||||
fpgettimeofday:=do_syscall(syscall_nr_gettimeofday,TSysParam(tp),TSysParam(tzp));
|
fpgettimeofday:=do_syscall(syscall_nr_gettimeofday,TSysParam(tp),TSysParam(tzp));
|
||||||
end;
|
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'];
|
Function FpNanoSleep(req : ptimespec;rem : ptimespec) : cint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
|
||||||
begin
|
begin
|
||||||
{$ifndef darwin}
|
{$ifndef darwin}
|
||||||
@ -599,7 +614,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* changed i386 to cpui386
|
||||||
|
|
||||||
Revision 1.12 2003/09/27 13:45:58 peter
|
Revision 1.12 2003/09/27 13:45:58 peter
|
||||||
|
@ -29,14 +29,14 @@ Unit {$ifdef VER1_0}Syslinux{$else}System{$endif};
|
|||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
|
{$I sysunixh.inc}
|
||||||
|
|
||||||
{$define FPC_USE_SIGPROCMASK}
|
{$define FPC_USE_SIGPROCMASK}
|
||||||
{$define FPC_USE_SIGALTSTACK}
|
{$define FPC_USE_SIGALTSTACK}
|
||||||
|
|
||||||
CONST SIGSTKSZ = 40960;
|
CONST SIGSTKSZ = 40960;
|
||||||
|
|
||||||
|
|
||||||
{$I sysunixh.inc}
|
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
Var Errno : longint;
|
Var Errno : longint;
|
||||||
@ -108,7 +108,10 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* texception4 fix merge
|
||||||
|
|
||||||
Revision 1.8 2003/01/05 19:01:28 marco
|
Revision 1.8 2003/01/05 19:01:28 marco
|
||||||
|
Loading…
Reference in New Issue
Block a user