From 7e0cc8e36ea91d0299f375f3b3476ab58ab71dde Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 2 Sep 2009 10:07:59 -0700 Subject: another attempt at cpu-local variables. this time do it ourselves instead of piggybacking on TLS. add -fno-pic to Makefile; pic code breaks our fake TLS. --- main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 57af27c..60cd1b3 100644 --- a/main.c +++ b/main.c @@ -5,9 +5,6 @@ #include "proc.h" #include "x86.h" -__thread struct cpu *cpu; -__thread struct proc *proc; - static void bootothers(void); static void mpmain(void) __attribute__((noreturn)); @@ -22,6 +19,7 @@ main(void) ioapicinit(); // another interrupt controller consoleinit(); // I/O devices & their interrupts uartinit(); // serial port +cprintf("cpus %p cpu %p\n", cpus, cpu); cprintf("\ncpu%d: starting xv6\n\n", cpu->id); kinit(); // physical memory allocator -- cgit v1.2.3