diff options
author | Frans Kaashoek <[email protected]> | 2017-08-07 14:35:05 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2017-08-07 14:35:05 -0400 |
commit | 61cb32aa9bc457a6b39c5055cbf7fdd718dab7c2 (patch) | |
tree | 74f1a818d7722264d8a0fe825760d01ea7a83a9a /main.c | |
parent | 5cbccef811ce0347370723c0b931e108c306279e (diff) | |
parent | c9fa90f7e514f27fa1ac071cd9795f3830ab6a1b (diff) | |
download | xv6-labs-61cb32aa9bc457a6b39c5055cbf7fdd718dab7c2.tar.gz xv6-labs-61cb32aa9bc457a6b39c5055cbf7fdd718dab7c2.tar.bz2 xv6-labs-61cb32aa9bc457a6b39c5055cbf7fdd718dab7c2.zip |
Merge branch 'nogs'
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -22,7 +22,6 @@ main(void) mpinit(); // detect other processors lapicinit(); // interrupt controller seginit(); // segment descriptors - cprintf("\ncpu%d: starting xv6\n\n", cpunum()); picinit(); // another interrupt controller ioapicinit(); // another interrupt controller consoleinit(); // console hardware @@ -31,7 +30,7 @@ main(void) tvinit(); // trap vectors binit(); // buffer cache fileinit(); // file table - ideinit(); // disk + ideinit(); // disk if(!ismp) timerinit(); // uniprocessor timer startothers(); // start other processors @@ -54,9 +53,9 @@ mpenter(void) static void mpmain(void) { - cprintf("cpu%d: starting\n", cpunum()); + cprintf("cpu%d: starting %d\n", cpuid(), cpuid()); idtinit(); // load idt register - xchg(&cpu->started, 1); // tell startothers() we're up + xchg(&(mycpu()->started), 1); // tell startothers() we're up scheduler(); // start running processes } @@ -78,7 +77,7 @@ startothers(void) memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); for(c = cpus; c < cpus+ncpu; c++){ - if(c == cpus+cpunum()) // We've started already. + if(c == mycpu()) // We've started already. continue; // Tell entryother.S what stack to use, where to enter, and what |