[BACK]Return to proc.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / sys

Annotation of src/sys/sys/proc.h, Revision 1.84.2.2

1.84.2.2! bouyer      1: /*     $NetBSD$        */
1.29      cgd         2:
                      3: /*-
                      4:  * Copyright (c) 1986, 1989, 1991, 1993
                      5:  *     The Regents of the University of California.  All rights reserved.
                      6:  * (c) UNIX System Laboratories, Inc.
                      7:  * All or some portions of this file are derived from material licensed
                      8:  * to the University of California by American Telephone and Telegraph
                      9:  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
                     10:  * the permission of UNIX System Laboratories, Inc.
                     11:  *
                     12:  * Redistribution and use in source and binary forms, with or without
                     13:  * modification, are permitted provided that the following conditions
                     14:  * are met:
                     15:  * 1. Redistributions of source code must retain the above copyright
                     16:  *    notice, this list of conditions and the following disclaimer.
                     17:  * 2. Redistributions in binary form must reproduce the above copyright
                     18:  *    notice, this list of conditions and the following disclaimer in the
                     19:  *    documentation and/or other materials provided with the distribution.
                     20:  * 3. All advertising materials mentioning features or use of this software
                     21:  *    must display the following acknowledgement:
                     22:  *     This product includes software developed by the University of
                     23:  *     California, Berkeley and its contributors.
                     24:  * 4. Neither the name of the University nor the names of its contributors
                     25:  *    may be used to endorse or promote products derived from this software
                     26:  *    without specific prior written permission.
                     27:  *
                     28:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     29:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     30:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     31:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     32:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     33:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     34:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     35:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     36:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     37:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     38:  * SUCH DAMAGE.
                     39:  *
1.59      fvdl       40:  *     @(#)proc.h      8.15 (Berkeley) 5/19/95
1.29      cgd        41:  */
                     42:
                     43: #ifndef _SYS_PROC_H_
                     44: #define        _SYS_PROC_H_
1.57      mrg        45:
1.83      thorpej    46: #if defined(_KERNEL) && !defined(_LKM)
                     47: #include "opt_multiprocessor.h"
                     48: #endif
                     49:
1.84.2.1  bouyer     50: #if defined(_KERNEL)
1.83      thorpej    51: #include <machine/cpu.h>               /* curcpu() and cpu_info */
                     52: #endif
1.29      cgd        53: #include <machine/proc.h>              /* Machine-dependent proc substruct. */
1.79      thorpej    54: #include <sys/lock.h>
1.32      mycroft    55: #include <sys/queue.h>
1.84.2.1  bouyer     56: #include <sys/callout.h>
1.29      cgd        57:
                     58: /*
                     59:  * One structure allocated per session.
                     60:  */
                     61: struct session {
                     62:        int     s_count;                /* Ref cnt; pgrps in session. */
                     63:        struct  proc *s_leader;         /* Session leader. */
                     64:        struct  vnode *s_ttyvp;         /* Vnode of controlling terminal. */
                     65:        struct  tty *s_ttyp;            /* Controlling terminal. */
                     66:        char    s_login[MAXLOGNAME];    /* Setlogin() name. */
1.58      thorpej    67:        pid_t   s_sid;                  /* session ID (pid of leader) */
1.29      cgd        68: };
                     69:
                     70: /*
                     71:  * One structure allocated per process group.
                     72:  */
                     73: struct pgrp {
1.32      mycroft    74:        LIST_ENTRY(pgrp) pg_hash;       /* Hash chain. */
                     75:        LIST_HEAD(, proc) pg_members;   /* Pointer to pgrp members. */
1.29      cgd        76:        struct  session *pg_session;    /* Pointer to session. */
                     77:        pid_t   pg_id;                  /* Pgrp id. */
                     78:        int     pg_jobc;        /* # procs qualifying pgrp for job control */
                     79: };
                     80:
                     81: /*
1.40      christos   82:  * One structure allocated per emulation.
                     83:  */
                     84: struct exec_package;
                     85: struct ps_strings;
                     86:
                     87: struct emul {
                     88:        char    e_name[8];              /* Symbolic name */
                     89:        int     *e_errno;               /* Errno array */
                     90:                                        /* Signal sending function */
1.65      mycroft    91:        void    (*e_sendsig) __P((sig_t, int, sigset_t *, u_long));
1.40      christos   92:        int     e_nosys;                /* Offset of the nosys() syscall */
                     93:        int     e_nsysent;              /* Number of system call entries */
1.84.2.2! bouyer     94:        const struct sysent *e_sysent;  /* System call array */
        !            95:        const char * const *e_syscallnames;     /* System call name array */
1.40      christos   96:        char    *e_sigcode;             /* Start of sigcode */
                     97:        char    *e_esigcode;            /* End of sigcode */
1.84.2.2! bouyer     98:
        !            99:        /* Per-process hooks */
        !           100:        void    (*e_proc_exec) __P((struct proc *, struct exec_package *));
        !           101:        void    (*e_proc_fork) __P((struct proc *p, struct proc *parent));
        !           102:        void    (*e_proc_exit) __P((struct proc *));
1.40      christos  103: };
                    104:
                    105: /*
1.29      cgd       106:  * Description of a process.
                    107:  *
                    108:  * This structure contains the information needed to manage a thread of
                    109:  * control, known in UN*X as a process; it has references to substructures
                    110:  * containing descriptions of things that the process uses, but may share
                    111:  * with related processes.  The process structure and the substructures
                    112:  * are always addressible except for those marked "(PROC ONLY)" below,
                    113:  * which might be addressible only on a processor on which the process
                    114:  * is running.
                    115:  */
                    116: struct proc {
                    117:        struct  proc *p_forw;           /* Doubly-linked run/sleep queue. */
                    118:        struct  proc *p_back;
1.32      mycroft   119:        LIST_ENTRY(proc) p_list;        /* List of all processes. */
1.29      cgd       120:
                    121:        /* substructures: */
                    122:        struct  pcred *p_cred;          /* Process owner's identity. */
                    123:        struct  filedesc *p_fd;         /* Ptr to open files structure. */
1.75      thorpej   124:        struct  cwdinfo *p_cwdi;        /* cdir/rdir/cmask info */
1.29      cgd       125:        struct  pstats *p_stats;        /* Accounting/statistics (PROC ONLY). */
                    126:        struct  plimit *p_limit;        /* Process limits. */
                    127:        struct  vmspace *p_vmspace;     /* Address space. */
                    128:        struct  sigacts *p_sigacts;     /* Signal actions, state (PROC ONLY). */
                    129:
                    130: #define        p_ucred         p_cred->pc_ucred
                    131: #define        p_rlimit        p_limit->pl_rlimit
                    132:
1.76      thorpej   133:        int     p_exitsig;              /* signal to sent to parent on exit */
1.29      cgd       134:        int     p_flag;                 /* P_* flags. */
1.84.2.1  bouyer    135:        struct cpu_info * __volatile p_cpu; /* CPU we're running on if
                    136:                                               SONPROC */
1.40      christos  137:        u_char  p_unused;               /* XXX: used to be emulation flag */
1.29      cgd       138:        char    p_stat;                 /* S* process status. */
1.32      mycroft   139:        char    p_pad1[2];
1.29      cgd       140:
                    141:        pid_t   p_pid;                  /* Process identifier. */
1.32      mycroft   142:        LIST_ENTRY(proc) p_hash;        /* Hash chain. */
                    143:        LIST_ENTRY(proc) p_pglist;      /* List of processes in pgrp. */
                    144:        struct  proc *p_pptr;           /* Pointer to parent process. */
                    145:        LIST_ENTRY(proc) p_sibling;     /* List of sibling processes. */
                    146:        LIST_HEAD(, proc) p_children;   /* Pointer to list of children. */
1.29      cgd       147:
                    148: /* The following fields are all zeroed upon creation in fork. */
1.32      mycroft   149: #define        p_startzero     p_oppid
1.29      cgd       150:
                    151:        pid_t   p_oppid;         /* Save parent pid during ptrace. XXX */
1.43      christos  152:        int     p_dupfd;         /* Sideways return value from filedescopen. XXX */
1.29      cgd       153:
                    154:        /* scheduling */
1.71      sommerfe  155:        u_int   p_estcpu;        /* Time averaged value of p_cpticks. XXX belongs in p_startcopy section */
1.29      cgd       156:        int     p_cpticks;       /* Ticks of cpu time. */
                    157:        fixpt_t p_pctcpu;        /* %cpu for this process during p_swtime */
                    158:        void    *p_wchan;        /* Sleep address. */
1.84.2.1  bouyer    159:        struct callout p_tsleep_ch;/* callout for tsleep */
1.52      mycroft   160:        const char *p_wmesg;     /* Reason for sleep. */
1.29      cgd       161:        u_int   p_swtime;        /* Time swapped in or out. */
                    162:        u_int   p_slptime;       /* Time since last blocked. */
                    163:
1.84.2.1  bouyer    164:        struct  callout p_realit_ch;    /* real time callout */
1.29      cgd       165:        struct  itimerval p_realtimer;  /* Alarm timer. */
                    166:        struct  timeval p_rtime;        /* Real time. */
                    167:        u_quad_t p_uticks;              /* Statclock hits in user mode. */
                    168:        u_quad_t p_sticks;              /* Statclock hits in system mode. */
                    169:        u_quad_t p_iticks;              /* Statclock hits processing intr. */
                    170:
                    171:        int     p_traceflag;            /* Kernel trace points. */
1.84.2.1  bouyer    172:        struct  file *p_tracep;         /* Trace to file */
1.29      cgd       173:
1.65      mycroft   174:        sigset_t p_siglist;             /* Signals arrived but not delivered. */
                    175:        char    p_sigcheck;             /* May have deliverable signals. */
1.29      cgd       176:
                    177:        struct  vnode *p_textvp;        /* Vnode of executable. */
1.50      fvdl      178:
1.84.2.1  bouyer    179:        int     p_locks;                /* DEBUG: lockmgr count of held locks */
1.29      cgd       180:
                    181:        int     p_holdcnt;              /* If non-zero, don't swap. */
1.84.2.2! bouyer    182:        const struct emul *p_emul;      /* Emulation information */
        !           183:        void    *p_emuldata;            /* Per-process emulation data, or NULL.
        !           184:                                         * Malloc type M_EMULDATA */
1.29      cgd       185:
                    186: /* End area that is zeroed on creation. */
                    187: #define        p_endzero       p_startcopy
                    188:
                    189: /* The following fields are all copied upon creation in fork. */
                    190: #define        p_startcopy     p_sigmask
                    191:
                    192:        sigset_t p_sigmask;     /* Current signal mask. */
                    193:        sigset_t p_sigignore;   /* Signals being ignored. */
                    194:        sigset_t p_sigcatch;    /* Signals being caught by user. */
                    195:
                    196:        u_char  p_priority;     /* Process priority. */
                    197:        u_char  p_usrpri;       /* User-priority based on p_cpu and p_nice. */
1.46      ws        198:        u_char  p_nice;         /* Process "nice" value. */
1.29      cgd       199:        char    p_comm[MAXCOMLEN+1];
                    200:
                    201:        struct  pgrp *p_pgrp;   /* Pointer to process group. */
1.72      kleink    202:        void    *p_ctxlink;     /* uc_link {get,set}context */
1.29      cgd       203:
1.84.2.1  bouyer    204:        struct  ps_strings *p_psstr;    /* address of process's ps_strings */
                    205:        size_t  p_psargv;               /* offset of ps_argvstr in above */
                    206:        size_t  p_psnargv;              /* offset of ps_nargvstr in above */
                    207:        size_t  p_psenv;                /* offset of ps_envstr in above */
                    208:        size_t  p_psnenv;               /* offset of ps_nenvstr in above */
                    209:
1.29      cgd       210: /* End area that is copied on creation. */
                    211: #define        p_endcopy       p_thread
                    212:
1.36      cgd       213:        void    *p_thread;      /* Id for this "thread"; Mach glue. XXX */
1.29      cgd       214:        struct  user *p_addr;   /* Kernel virtual addr of u-area (PROC ONLY). */
                    215:        struct  mdproc p_md;    /* Any machine-dependent fields. */
                    216:
                    217:        u_short p_xstat;        /* Exit status for wait; also stop signal. */
                    218:        u_short p_acflag;       /* Accounting flags. */
                    219:        struct  rusage *p_ru;   /* Exit information. XXX */
                    220: };
                    221:
                    222: #define        p_session       p_pgrp->pg_session
                    223: #define        p_pgid          p_pgrp->pg_id
                    224:
1.84.2.1  bouyer    225: /*
                    226:  * Status values.
                    227:  *
                    228:  * A note about SRUN and SONPROC: SRUN indicates that a process is
                    229:  * runnable but *not* yet running, i.e. is on a run queue.  SONPROC
                    230:  * indicates that the process is actually executing on a CPU, i.e.
                    231:  * it is no longer on a run queue.
                    232:  */
1.29      cgd       233: #define        SIDL    1               /* Process being created by fork. */
                    234: #define        SRUN    2               /* Currently runnable. */
                    235: #define        SSLEEP  3               /* Sleeping on an address. */
                    236: #define        SSTOP   4               /* Process debugging or suspension. */
                    237: #define        SZOMB   5               /* Awaiting collection by parent. */
1.79      thorpej   238: #define        SDEAD   6               /* Process is almost a zombie. */
1.84.2.1  bouyer    239: #define        SONPROC 7               /* Process is currently on a CPU */
1.79      thorpej   240:
                    241: #define        P_ZOMBIE(p)     ((p)->p_stat == SZOMB || (p)->p_stat == SDEAD)
1.29      cgd       242:
1.41      mycroft   243: /* These flags are kept in p_flag. */
1.29      cgd       244: #define        P_ADVLOCK       0x00001 /* Process may hold a POSIX advisory lock. */
                    245: #define        P_CONTROLT      0x00002 /* Has a controlling terminal. */
                    246: #define        P_INMEM         0x00004 /* Loaded into memory. */
                    247: #define        P_NOCLDSTOP     0x00008 /* No SIGCHLD when children stop. */
                    248: #define        P_PPWAIT        0x00010 /* Parent is waiting for child to exec/exit. */
                    249: #define        P_PROFIL        0x00020 /* Has started profiling. */
                    250: #define        P_SELECT        0x00040 /* Selecting; wakeup/waiting danger. */
                    251: #define        P_SINTR         0x00080 /* Sleep is interruptible. */
                    252: #define        P_SUGID         0x00100 /* Had set id privileges since last exec. */
                    253: #define        P_SYSTEM        0x00200 /* System proc: no sigs, stats or swapping. */
                    254: #define        P_TIMEOUT       0x00400 /* Timing out during sleep. */
                    255: #define        P_TRACED        0x00800 /* Debugged process being traced. */
                    256: #define        P_WAITED        0x01000 /* Debugging process has waited for child. */
                    257: #define        P_WEXIT         0x02000 /* Working on exiting. */
                    258: #define        P_EXEC          0x04000 /* Process called exec. */
                    259: #define        P_OWEUPC        0x08000 /* Owe process an addupc() call at next ast. */
1.66      christos  260: #define        P_FSTRACE       0x10000 /* Debugger process being traced by procfs */
                    261: #define        P_NOCLDWAIT     0x20000 /* No zombies if child dies */
1.84.2.1  bouyer    262: #define        P_32            0x40000 /* 32-bit process (used on 64-bit kernels) */
                    263: #define P_BIGLOCK      0x80000 /* Process needs kernel "big lock" to run */
                    264:
1.29      cgd       265:
                    266: /*
1.78      thorpej   267:  * Macro to compute the exit signal to be delivered.
1.76      thorpej   268:  */
1.78      thorpej   269: #define        P_EXITSIG(p)    (((p)->p_flag & (P_TRACED|P_FSTRACE)) ? SIGCHLD : \
                    270:                         p->p_exitsig)
1.76      thorpej   271:
                    272: /*
1.29      cgd       273:  * MOVE TO ucred.h?
                    274:  *
                    275:  * Shareable process credentials (always resident).  This includes a reference
                    276:  * to the current user credentials as well as real and saved ids that may be
                    277:  * used to change ids.
                    278:  */
                    279: struct pcred {
                    280:        struct  ucred *pc_ucred;        /* Current credentials. */
                    281:        uid_t   p_ruid;                 /* Real user id. */
                    282:        uid_t   p_svuid;                /* Saved effective user id. */
                    283:        gid_t   p_rgid;                 /* Real group id. */
                    284:        gid_t   p_svgid;                /* Saved effective group id. */
                    285:        int     p_refcnt;               /* Number of references. */
                    286: };
                    287:
1.64      thorpej   288: LIST_HEAD(proclist, proc);             /* a list of processes */
                    289:
                    290: /*
                    291:  * This structure associates a proclist with its lock.
                    292:  */
                    293: struct proclist_desc {
                    294:        struct proclist *pd_list;       /* the list */
                    295:        /*
                    296:         * XXX Add a pointer to the proclist's lock eventually.
                    297:         */
                    298: };
                    299:
1.38      jtc       300: #ifdef _KERNEL
1.29      cgd       301: /*
                    302:  * We use process IDs <= PID_MAX; PID_MAX + 1 must also fit in a pid_t,
                    303:  * as it is used to represent "no process group".
                    304:  */
                    305: #define        PID_MAX         30000
                    306: #define        NO_PID          30001
                    307:
                    308: #define SESS_LEADER(p) ((p)->p_session->s_leader == (p))
                    309: #define        SESSHOLD(s)     ((s)->s_count++)
                    310: #define        SESSRELE(s) {                                                   \
                    311:        if (--(s)->s_count == 0)                                        \
                    312:                FREE(s, M_SESSION);                                     \
                    313: }
                    314:
1.56      mrg       315: #define        PHOLD(p) {                                                      \
                    316:        if ((p)->p_holdcnt++ == 0 && ((p)->p_flag & P_INMEM) == 0)      \
                    317:                uvm_swapin(p);                                          \
                    318: }
1.41      mycroft   319: #define        PRELE(p)        (--(p)->p_holdcnt)
1.54      thorpej   320:
                    321: /*
                    322:  * Flags passed to fork1().
                    323:  */
                    324: #define        FORK_PPWAIT     0x01            /* block parent until child exit */
                    325: #define        FORK_SHAREVM    0x02            /* share vmspace with parent */
1.75      thorpej   326: #define        FORK_SHARECWD   0x04            /* share cdir/rdir/cmask */
                    327: #define        FORK_SHAREFILES 0x08            /* share file descriptors */
                    328: #define        FORK_SHARESIGS  0x10            /* share signal actions */
1.41      mycroft   329:
1.32      mycroft   330: #define        PIDHASH(pid)    (&pidhashtbl[(pid) & pidhash])
                    331: extern LIST_HEAD(pidhashhead, proc) *pidhashtbl;
                    332: extern u_long pidhash;
                    333:
                    334: #define        PGRPHASH(pgid)  (&pgrphashtbl[(pgid) & pgrphash])
                    335: extern LIST_HEAD(pgrphashhead, pgrp) *pgrphashtbl;
                    336: extern u_long pgrphash;
                    337:
1.67      pk        338: /*
1.84.2.1  bouyer    339:  * Allow machine-dependent code to override curproc in <machine/cpu.h> for
1.83      thorpej   340:  * its own convenience.  Otherwise, we declare it as appropriate.
1.67      pk        341:  */
1.83      thorpej   342: #if !defined(curproc)
                    343: #if defined(MULTIPROCESSOR)
                    344: #define        curproc curcpu()->ci_curproc    /* Current running proc. */
                    345: #else
1.29      cgd       346: extern struct proc *curproc;           /* Current running proc. */
1.83      thorpej   347: #endif /* MULTIPROCESSOR */
                    348: #endif /* ! curproc */
                    349:
1.29      cgd       350: extern struct proc proc0;              /* Process slot for swapper. */
                    351: extern int nprocs, maxproc;            /* Current and max number of procs. */
                    352:
1.80      thorpej   353: /* Process list lock; see kern_proc.c for locking protocol details. */
                    354: extern struct lock proclist_lock;
                    355:
1.32      mycroft   356: extern struct proclist allproc;                /* List of all processes. */
1.79      thorpej   357: extern struct proclist zombproc;       /* List of zombie processes. */
                    358:
1.64      thorpej   359: extern struct proclist deadproc;       /* List of dead processes. */
1.79      thorpej   360: extern struct simplelock deadproc_slock;
1.64      thorpej   361:
1.84.2.1  bouyer    362: extern struct proc *initproc;          /* Process slots for init, pager. */
1.61      thorpej   363:
1.64      thorpej   364: extern const struct proclist_desc proclists[];
                    365:
1.61      thorpej   366: extern struct pool proc_pool;          /* memory pool for procs */
1.62      thorpej   367: extern struct pool pcred_pool;         /* memory pool for pcreds */
                    368: extern struct pool plimit_pool;                /* memory pool for plimits */
1.63      thorpej   369: extern struct pool rusage_pool;                /* memory pool for rusages */
1.29      cgd       370:
                    371: struct proc *pfind __P((pid_t));       /* Find process by id. */
                    372: struct pgrp *pgfind __P((pid_t));      /* Find process group by id. */
                    373:
1.84.2.1  bouyer    374: struct simplelock;
                    375:
1.35      cgd       376: int    chgproccnt __P((uid_t uid, int diff));
                    377: int    enterpgrp __P((struct proc *p, pid_t pgid, int mksess));
1.29      cgd       378: void   fixjobc __P((struct proc *p, struct pgrp *pgrp, int entering));
1.84.2.1  bouyer    379: int    inferior __P((struct proc *p, struct proc *q));
1.35      cgd       380: int    leavepgrp __P((struct proc *p));
1.84.2.1  bouyer    381: void   yield __P((void));
                    382: void   preempt __P((struct proc *));
                    383: void   mi_switch __P((struct proc *));
1.36      cgd       384: void   pgdelete __P((struct pgrp *pgrp));
1.35      cgd       385: void   procinit __P((void));
1.47      cgd       386: void   remrunqueue __P((struct proc *));
1.29      cgd       387: void   resetpriority __P((struct proc *));
                    388: void   setrunnable __P((struct proc *));
                    389: void   setrunqueue __P((struct proc *));
1.84.2.1  bouyer    390: void   suspendsched __P((void));
                    391: int    ltsleep __P((void *chan, int pri, const char *wmesg, int timo,
                    392:            __volatile struct simplelock *));
1.29      cgd       393: void   unsleep __P((struct proc *));
                    394: void   wakeup __P((void *chan));
1.82      thorpej   395: void   wakeup_one __P((void *chan));
1.84.2.1  bouyer    396: void   reaper __P((void *));
1.42      christos  397: void   exit1 __P((struct proc *, int));
1.64      thorpej   398: void   exit2 __P((struct proc *));
1.84.2.1  bouyer    399: int    fork1 __P((struct proc *, int, int, void *, size_t,
                    400:            void (*)(void *), void *, register_t *, struct proc **));
1.42      christos  401: void   rqinit __P((void));
                    402: int    groupmember __P((gid_t, struct ucred *));
1.44      christos  403: void   cpu_switch __P((struct proc *));
                    404: void   cpu_wait __P((struct proc *));
                    405: void   cpu_exit __P((struct proc *));
1.84.2.1  bouyer    406: void   cpu_fork __P((struct proc *, struct proc *, void *, size_t,
                    407:            void (*)(void *), void *));
                    408:
                    409: void   child_return __P((void *));
                    410:
1.74      sommerfe  411: int    proc_isunder __P((struct proc *, struct proc*));
1.80      thorpej   412:
1.81      thorpej   413: void   proclist_lock_read __P((void));
1.80      thorpej   414: void   proclist_unlock_read __P((void));
                    415: int    proclist_lock_write __P((void));
                    416: void   proclist_unlock_write __P((int));
1.84      bouyer    417: void   p_sugid __P((struct proc*));
1.84.2.1  bouyer    418:
                    419: /* Compatbility with old, non-interlocked tsleep call. */
                    420: #define        tsleep(chan, pri, wmesg, timo)                                  \
                    421:        ltsleep(chan, pri, wmesg, timo, NULL)
                    422:
                    423: #if defined(MULTIPROCESSOR)
                    424: void   proc_trampoline_mp(void);       /* XXX */
                    425: #endif
                    426:
1.38      jtc       427: #endif /* _KERNEL */
1.29      cgd       428: #endif /* !_SYS_PROC_H_ */

CVSweb <webmaster@jp.NetBSD.org>