+#if VAX780
+ if (cpu == VAX_780 && !BASEPRI(ps))
+ unhang();
+#endif
+ setsoftclock();
+}
+
+/*
+ * Constant for decay filter for cpu usage.
+ */
+double ccpu = 0.95122942450071400909; /* exp(-1/20) */
+
+/*
+ * Software clock interrupt.
+ * This routine is blocked by spl1(),
+ * which doesn't block device interrupts!
+ */
+/*ARGSUSED*/
+softclock(pc, ps)
+ caddr_t pc;
+{
+ register struct callout *p1, *p2;
+ register struct proc *pp;
+ register int a, s;
+
+ /*
+ * callout
+ */
+ if(callout[0].c_time <= 0) {
+ p1 = &callout[0];
+ while(p1->c_func != 0 && p1->c_time <= 0) {
+ (*p1->c_func)(p1->c_arg);
+ p1++;
+ }
+ p2 = &callout[0];
+ while(p2->c_func = p1->c_func) {
+ p2->c_time = p1->c_time;
+ p2->c_arg = p1->c_arg;
+ p1++;
+ p2++;
+ }
+ }
+
+ /*
+ * Drain silos.
+ */
+#if NDH > 0
+ s = spl5(); dhtimer(); splx(s);
+#endif
+#if NDZ > 0
+ s = spl5(); dztimer(); splx(s);
+#endif
+
+ /*
+ * If idling and processes are waiting to swap in,
+ * check on them.
+ */
+ if (noproc && runin) {
+ runin = 0;
+ wakeup((caddr_t)&runin);
+ }
+
+ /*
+ * Run paging daemon and reschedule every 1/4 sec.
+ */
+ if (lbolt % (hz/4) == 0) {