summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2017-02-01 18:04:13 -0500
committerFrans Kaashoek <[email protected]>2017-02-01 18:04:13 -0500
commited396c068b881877330f7d40bfce02db9b1199b3 (patch)
tree69103a78128b46d6bae179b0440cca0a9c7f0b0c /main.c
parentfbb4c0944422f860484142010bb9f366f3e87bf8 (diff)
downloadxv6-labs-ed396c068b881877330f7d40bfce02db9b1199b3.tar.gz
xv6-labs-ed396c068b881877330f7d40bfce02db9b1199b3.tar.bz2
xv6-labs-ed396c068b881877330f7d40bfce02db9b1199b3.zip
Eliminate code for gs trick to track per-cpu state. We rely on lapiccpunum()
to find a per-cpu id with which we locate a cpu's cpu struct.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index d7e59cf..e5b7d64 100644
--- a/main.c
+++ b/main.c
@@ -53,7 +53,7 @@ mpenter(void)
static void
mpmain(void)
{
- cprintf("cpu%d: starting %d\n", cpuid(), lapiccpunum());
+ cprintf("cpu%d: starting %d\n", cpuid(), cpuid());
idtinit(); // load idt register
xchg(&(mycpu()->started), 1); // tell startothers() we're up
scheduler(); // start running processes