new fields for signals
authorBill Joy <bill@ucbvax.Berkeley.EDU>
Fri, 16 May 1980 08:18:07 +0000 (00:18 -0800)
committerBill Joy <bill@ucbvax.Berkeley.EDU>
Fri, 16 May 1980 08:18:07 +0000 (00:18 -0800)
SCCS-vsn: sys/sys/proc.h 3.3
SCCS-vsn: sys/sys/user.h 3.3

usr/src/sys/sys/proc.h
usr/src/sys/sys/user.h

index 02ba1ab..2cfc61e 100644 (file)
@@ -1,4 +1,4 @@
-/*     proc.h  3.2     %H%     */
+/*     proc.h  3.3     %H%     */
 
 /*
  * One structure allocated per active
@@ -22,9 +22,12 @@ struct       proc
        char    p_time;         /* resident time for scheduling */
        char    p_nice;         /* nice for cpu usage */
        char    p_slptime;      /* time since last block */
-       int     p_flag;
+       char    p_cursig;
        int     p_sig;          /* signals pending to this process */
-       int     p_ignsig;       /* ignored signals */
+       long    p_siga0;        /* low bit of 2 bit signal action */
+       long    p_siga1;        /* high bit of 2 bit signal action */
+#define        p_ignsig p_siga0        /* ignored signal mask */
+       int     p_flag;
        short   p_uid;          /* user id, used to direct tty signals */
        short   p_pgrp;         /* name of process group leader */
        short   p_pid;          /* unique process id */
@@ -46,6 +49,7 @@ struct        proc
        short   p_aveflt;       /* average of p_faults into past */
        short   p_ndx;          /* proc index for memall (because of vfork) */
        short   p_idhash;       /* hashed based on p_pid for kill+exit+... */
+       struct  proc *p_pptr;   /* pointer to process structure of parent */
 };
 
 #define        PIDHSZ          63
@@ -121,9 +125,11 @@ struct     xproc
        char    xp_time;        /* resident time for scheduling */
        char    xp_nice;        /* nice for cpu usage */
        char    xp_slptime;
-       int     xp_flag;
+       char    p_cursig;
        int     xp_sig;         /* signals pending to this process */
-       int     xp_ignsig;
+       int     xp_siga0;
+       int     xp_siga1;
+       int     xp_flag;
        short   xp_uid;         /* user id, used to direct tty signals */
        short   xp_pgrp;        /* name of process group leader */
        short   xp_pid;         /* unique process id */
index 7166a35..99848ad 100644 (file)
@@ -1,4 +1,4 @@
-/*     user.h  3.2     %H%     */
+/*     user.h  3.3     %H%     */
 
 #ifdef KERNEL
 #include "../h/pcb.h"
@@ -64,7 +64,7 @@ struct        user
        struct  file *u_ofile[NOFILE];  /* pointers to file structures of open files */
        char    u_pofile[NOFILE];       /* per-process flags of open files */
        label_t u_ssav;                 /* label variable for swapping */
-       int     u_signal[NSIG];         /* disposition of signals */
+       int     (*u_signal[NSIG])();    /* disposition of signals */
        int     u_cfcode;               /* ``code'' to trap when CM faulted */
        int     *u_ar0;                 /* address of users saved R0 */
        struct uprof {                  /* profile arguments */
@@ -73,7 +73,7 @@ struct        user
                unsigned pr_off;        /* pc offset */
                unsigned pr_scale;      /* pc scaling */
        } u_prof;
-       char    u_intflg;               /* catch intr from sys */
+       char    u_eosys;                /* special action on end of syscall */
        char    u_sep;                  /* flag for I and D separation */
        struct  tty *u_ttyp;            /* controlling tty pointer */
        dev_t   u_ttyd;                 /* controlling tty dev */
@@ -113,41 +113,12 @@ struct    user
                                         */
 };
 
+/* u_eosys values */
+#define        JUSTRETURN      0
+#define        RESTARTSYS      1
+
 /* u_error codes */
-#define        EPERM   1
-#define        ENOENT  2
-#define        ESRCH   3
-#define        EINTR   4
-#define        EIO     5
-#define        ENXIO   6
-#define        E2BIG   7
-#define        ENOEXEC 8
-#define        EBADF   9
-#define        ECHILD  10
-#define        EAGAIN  11
-#define        ENOMEM  12
-#define        EACCES  13
-#define        EFAULT  14
-#define        ENOTBLK 15
-#define        EBUSY   16
-#define        EEXIST  17
-#define        EXDEV   18
-#define        ENODEV  19
-#define        ENOTDIR 20
-#define        EISDIR  21
-#define        EINVAL  22
-#define        ENFILE  23
-#define        EMFILE  24
-#define        ENOTTY  25
-#define        ETXTBSY 26
-#define        EFBIG   27
-#define        ENOSPC  28
-#define        ESPIPE  29
-#define        EROFS   30
-#define        EMLINK  31
-#define        EPIPE   32
-#define        EDOM    33
-#define        ERANGE  34
+#include <errno.h>
 
 #ifdef KERNEL
 extern struct user u;