diff options
author | rsc <rsc> | 2007-10-01 20:43:15 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-10-01 20:43:15 +0000 |
commit | 943fd378a1324ca60da72b271769fea4a86e36cb (patch) | |
tree | a2510dc65a996e7d7fc49ab1e594ccb5a45f20ba /main.c | |
parent | 9fd9f80431ad85552c0969831a3ccc3e800ac464 (diff) | |
download | xv6-labs-943fd378a1324ca60da72b271769fea4a86e36cb.tar.gz xv6-labs-943fd378a1324ca60da72b271769fea4a86e36cb.tar.bz2 xv6-labs-943fd378a1324ca60da72b271769fea4a86e36cb.zip |
Incorporate new understanding of/with Intel SMP spec.
Dropped cmpxchg in favor of xchg, to match lecture notes.
Use xchg to release lock, for future protection and to
keep gcc from acting clever.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -50,8 +50,9 @@ mpmain(void) if(cpu() != mp_bcpu()) lapic_init(cpu()); setupsegs(0); - cpus[cpu()].booted = 1; + xchg(&cpus[cpu()].booted, 1); + cprintf("cpu%d: scheduling\n"); scheduler(); } |