Fix TLS for PIC systems

This commit is contained in:
Russ Cox 2009-09-02 07:41:08 -07:00
parent 45a9782636
commit 57ae146362
2 changed files with 2 additions and 0 deletions

1
proc.c
View file

@ -75,6 +75,7 @@ ksegment(void)
loadfsgs(SEG_KCPU << 3);
// Initialize cpu-local variables.
c->tlsstruct = &c->tlsstruct;
cpu = c;
proc = 0;
}

1
proc.h
View file

@ -59,6 +59,7 @@ struct cpu {
int ncli; // Depth of pushcli nesting.
int intena; // Were interrupts enabled before pushcli?
void *tls[2];
void *tlsstruct;
};
extern struct cpu cpus[NCPU];