コード例 #1
0
ファイル: main.c プロジェクト: franklixuefei/cs350-os161
/*
 * 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();
}
コード例 #2
0
ファイル: uw-tests.c プロジェクト: PhelanHarris/os161
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;
}
コード例 #3
0
ファイル: main.c プロジェクト: achankf/CS350-OS161
/*
 * Shutdown sequence. Opposite to boot().
 */
static
void
shutdown(void)
{
	kprintf("Shutting down.\n");
    vmstats_print();


	vfs_clearbootfs();
	vfs_clearcurdir();
	vfs_unmountall();

	thread_shutdown();

	splhigh();
}