/* * Shutdown sequence. Opposite to boot(). */ static void shutdown(void) { kprintf("Shutting down.\n"); vfs_clearbootfs(); vfs_clearcurdir(); vfs_unmountall(); #if OPT_A3 vmstats_print(); #endif splhigh(); #if OPT_A3 vm_shutdown(); shutdownSwapOps(); #endif scheduler_shutdown(); thread_shutdown(); }
int uwvmstatstest(int nargs, char **args) { int i, result; char name[NAME_LEN]; (void)nargs; (void)args; inititems(); kprintf("Starting uwvmstatstest...\n"); kprintf("Initializing vmstats\n"); vmstats_init(); for (i=0; i<NTESTTHREADS; i++) { snprintf(name, NAME_LEN, "vmstatsthread %d", i); result = thread_fork(name, NULL, vmstats_thread, NULL, i); if (result) { panic("uwvmstatstest: thread_fork failed: %s\n", strerror(result)); } } for (i=0; i<NTESTTHREADS; i++) { P(donesem); } vmstats_print(); cleanitems(); kprintf("uwvmstatstest done.\n"); return 0; }
/* * Shutdown sequence. Opposite to boot(). */ static void shutdown(void) { kprintf("Shutting down.\n"); vmstats_print(); vfs_clearbootfs(); vfs_clearcurdir(); vfs_unmountall(); thread_shutdown(); splhigh(); }