my solution to lab5

This commit is contained in:
winPond
2019-07-11 19:40:12 +08:00
parent 1f043fb694
commit f78713349c
364 changed files with 8775 additions and 3249 deletions

View File

@@ -47,20 +47,22 @@ i386_init(void)
// Starting non-boot CPUs
boot_aps();
// Start fs.
ENV_CREATE(fs_fs, ENV_TYPE_FS);
#if defined(TEST)
// Don't touch -- used by grading script!
ENV_CREATE(TEST, ENV_TYPE_USER);
#else
// Touch all you want.
//ENV_CREATE(user_primes, ENV_TYPE_USER);
ENV_CREATE(user_yield, ENV_TYPE_USER);
ENV_CREATE(user_yield, ENV_TYPE_USER);
ENV_CREATE(user_yield, ENV_TYPE_USER);
ENV_CREATE(user_yield, ENV_TYPE_USER);
ENV_CREATE(user_icode, ENV_TYPE_USER);
#endif // TEST*
// Should not be necessary - drains keyboard because interrupt has given up.
kbd_intr();
// Schedule and run the first user environment!
sched_yield();
}