提交 57ae1463 创建 作者: Russ Cox's avatar Russ Cox

Fix TLS for PIC systems

上级 45a97826
...@@ -75,6 +75,7 @@ ksegment(void) ...@@ -75,6 +75,7 @@ ksegment(void)
loadfsgs(SEG_KCPU << 3); loadfsgs(SEG_KCPU << 3);
// Initialize cpu-local variables. // Initialize cpu-local variables.
c->tlsstruct = &c->tlsstruct;
cpu = c; cpu = c;
proc = 0; proc = 0;
} }
......
...@@ -59,6 +59,7 @@ struct cpu { ...@@ -59,6 +59,7 @@ struct cpu {
int ncli; // Depth of pushcli nesting. int ncli; // Depth of pushcli nesting.
int intena; // Were interrupts enabled before pushcli? int intena; // Were interrupts enabled before pushcli?
void *tls[2]; void *tls[2];
void *tlsstruct;
}; };
extern struct cpu cpus[NCPU]; extern struct cpu cpus[NCPU];
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论