Bladeren bron

* moved sigprocmask to system

marco 22 jaren geleden
bovenliggende
commit
16c7ca4606
4 gewijzigde bestanden met toevoegingen van 48 en 21 verwijderingen
  1. 4 16
      rtl/bsd/bunxfunc.inc
  2. 19 1
      rtl/bsd/osmain.inc
  3. 19 1
      rtl/bsd/ossysc.inc
  4. 6 3
      rtl/bsd/system.pp

+ 4 - 16
rtl/bsd/bunxfunc.inc

@@ -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
 

+ 19 - 1
rtl/bsd/osmain.inc

@@ -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

+ 19 - 1
rtl/bsd/ossysc.inc

@@ -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

+ 6 - 3
rtl/bsd/system.pp

@@ -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