fix small
This commit is contained in:
parent
18bc30f0f9
commit
be6dd22181
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue