+
+/*
+ * init the process queues
+ */
+pqinit()
+{
+ register struct proc *p;
+
+ /*
+ * most procs are initially on freequeue
+ * nb: we place them there in their "natural" order.
+ */
+
+ freeproc = NULL;
+ for (p = procNPROC; --p > proc; freeproc = p)
+ p->p_nxt = freeproc;
+
+ /*
+ * but proc[0] is special ...
+ */
+
+ allproc = p;
+ p->p_nxt = NULL;
+ p->p_prev = &allproc;
+
+ zombproc = NULL;
+}