fix small

This commit is contained in:
hustccc 2020-10-28 09:22:21 +09:00
parent 18bc30f0f9
commit be6dd22181
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ void
main(unsigned long hartid, unsigned long dtb_pa)
{
printf("hart %d enter main()...\n", hartid);
// printf("hart %d enter main()...\n", hartid);
if (hartid == 0) {
printf("\n");
printf("xv6-k210 kernel is booting\n");

View File

@ -574,10 +574,11 @@ scheduler(void)
// to release its lock and then reacquire it
// before jumping back to us.
printf("[scheduler]found runnable proc: %d\n", p->pid);
// printf("%d\n", p->pid);
p->state = RUNNING;
c->proc = p;
swtch(&c->context, &p->context);
printf("[scheduler]return from user mode\n");
// Process is done running for now.
// It should have changed its p->state before coming back.
c->proc = 0;