fences for starting

This commit is contained in:
Robert Morris 2019-08-01 14:59:20 -04:00
parent 77da01abb1
commit fb8a0099d4

View file

@ -26,10 +26,12 @@ main()
fileinit(); // file table
virtio_disk_init(); // emulated hard disk
userinit(); // first user process
__sync_synchronize();
started = 1;
} else {
while(started == 0)
;
__sync_synchronize();
printf("hart %d starting\n", cpuid());
kvminithart(); // turn on paging
trapinithart(); // install kernel trap vector