* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
* @(#)kern_proc.c 7.2 (Berkeley) %G%
#include "../machine/reg.h"
#include "../machine/pte.h"
#include "../machine/psl.h"
* Clear any pending stops for top and all descendents.
~(sigmask(SIGTSTP
)|sigmask(SIGTTIN
)|sigmask(SIGTTOU
));
* If this process has children, descend to them next,
* otherwise do any siblings, and if done with this level,
* follow back up the tree (but not past top).
* Is p an inferior of the current process?
for (; p
!= u
.u_procp
; p
= p
->p_pptr
)
for (p
= &proc
[pidhash
[PIDHASH(pid
)]]; p
!= &proc
[0]; p
= &proc
[p
->p_idhash
])
return ((struct proc
*)0);
* init the process queues
* most procs are initially on freequeue
* nb: we place them there in their "natural" order.
for (p
= procNPROC
; --p
> proc
; freeproc
= p
)
* but proc[0] is special ...