mproc.h

Go to the documentation of this file.
00001 
00010 #include <timers.h>
00011 
00012 EXTERN struct mproc {
00013   struct mem_map mp_seg[NR_LOCAL_SEGS]; /* points to text, data, stack */
00014   char mp_exitstatus;           /* storage for status when process exits */
00015   char mp_sigstatus;            /* storage for signal # for killed procs */
00016   pid_t mp_pid;                 /* process id */
00017   int mp_endpoint;              /* kernel endpoint id */
00018   pid_t mp_procgrp;             /* pid of process group (used for signals) */
00019   pid_t mp_wpid;                /* pid this process is waiting for */
00020   int mp_parent;                /* index of parent process */
00021 
00022   /* Child user and system times. Accounting done on child exit. */
00023   clock_t mp_child_utime;       /* cumulative user time of children */
00024   clock_t mp_child_stime;       /* cumulative sys time of children */
00025 
00026   /* Real and effective uids and gids. */
00027   uid_t mp_realuid;             /* process' real uid */
00028   uid_t mp_effuid;              /* process' effective uid */
00029   gid_t mp_realgid;             /* process' real gid */
00030   gid_t mp_effgid;              /* process' effective gid */
00031 
00032   /* File identification for sharing. */
00033   ino_t mp_ino;                 /* inode number of file */
00034   dev_t mp_dev;                 /* device number of file system */
00035   time_t mp_ctime;              /* inode changed time */
00036 
00037   /* Signal handling information. */
00038   sigset_t mp_ignore;           /* 1 means ignore the signal, 0 means don't */
00039   sigset_t mp_catch;            /* 1 means catch the signal, 0 means don't */
00040   sigset_t mp_sig2mess;         /* 1 means transform into notify message */
00041   sigset_t mp_sigmask;          /* signals to be blocked */
00042   sigset_t mp_sigmask2;         /* saved copy of mp_sigmask */
00043   sigset_t mp_sigpending;       /* pending signals to be handled */
00044   struct sigaction mp_sigact[_NSIG + 1]; /* as in sigaction(2) */
00045   vir_bytes mp_sigreturn;       /* address of C library __sigreturn function */
00046   struct timer mp_timer;        /* watchdog timer for alarm(2) */
00047 
00048   /* Backwards compatibility for signals. */
00049   sighandler_t mp_func;         /* all sigs vectored to a single user fcn */
00050 
00051   unsigned mp_flags;            /* flag bits */
00052   vir_bytes mp_procargs;        /* ptr to proc's initial stack arguments */
00053   struct mproc *mp_swapq;       /* queue of procs waiting to be swapped in */
00054   message mp_reply;             /* reply message to be sent to one */
00055 
00056   /* Scheduling priority. */
00057   signed int mp_nice;           /* nice is PRIO_MIN..PRIO_MAX, standard 0. */
00058 
00059   char mp_name[PROC_NAME_LEN];  /* process name */
00060 } mproc[NR_PROCS];
00061 
00062 /* Flag values */
00063 #define IN_USE          0x001   /* set when 'mproc' slot in use */
00064 #define WAITING         0x002   /* set by WAIT system call */
00065 #define ZOMBIE          0x004   /* set by EXIT, cleared by WAIT */
00066 #define PAUSED          0x008   /* set by PAUSE system call */
00067 #define ALARM_ON        0x010   /* set when SIGALRM timer started */
00068 #define SEPARATE        0x020   /* set if file is separate I & D space */
00069 #define TRACED          0x040   /* set if process is to be traced */
00070 #define STOPPED         0x080   /* set if process stopped for tracing */
00071 #define SIGSUSPENDED    0x100   /* set by SIGSUSPEND system call */
00072 #define REPLY           0x200   /* set if a reply message is pending */
00073 #define ONSWAP          0x400   /* set if data segment is swapped out */
00074 #define SWAPIN          0x800   /* set if on the "swap this in" queue */
00075 #define DONT_SWAP      0x1000   /* never swap out this process */
00076 #define PRIV_PROC      0x2000   /* system process, special privileges */
00077 
00078 #define NIL_MPROC ((struct mproc *) 0)
00079 

Generated on Fri Apr 14 22:57:32 2006 for minix by  doxygen 1.4.6