#include <sys/signal.h>
#include <sys/tty.h>
#include <kern/task.h>
-#include <ufs/ufs/quota.h>
+#include <sys/quota.h>
#include <ufs/ufs/inode.h>
#if NCPUS > 1
#include <kern/processor.h>
int hostboot_option=0;
int funnel_state;
- static void proc_shutdown();
+ static void proc_shutdown();
+ extern void md_prepare_for_shutdown(int paniced, int howto, char * command);
funnel_state = thread_funnel_set(kernel_flock, TRUE);
- /* md_prepare_for_shutdown(paniced, howto, command); */
+ md_prepare_for_shutdown(paniced, howto, command);
if ((howto&RB_NOSYNC)==0 && waittime < 0) {
int iter, nbusy;
/*
* Kill as many procs as we can. (Except ourself...)
*/
- self = (struct proc *)(get_bsdtask_info(current_task()));
+ self = (struct proc *)current_proc();
/*
* Suspend /etc/init
if (p && p != self)
task_suspend(p->task); /* stop init */
- /*
- * Suspend mach_init
- */
- p = pfind(2);
- if (p && p != self)
- task_suspend(p->task); /* stop mach_init */
-
printf("Killing all processes ");
/*
* XXX
*/
if (p->exit_thread) { /* someone already doing it */
- thread_block(0);/* give him a chance */
+ /* give him a chance */
+ thread_block(THREAD_CONTINUE_NULL);
}
else {
p->exit_thread = current_thread();
printf(".");
- exit1(p, 1);
+ exit1(p, 1, (int *)NULL);
}
p = allproc.lh_first;
}