Skip to content
Snippets Groups Projects
Unverified Commit f5651b22 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Do not overwrite static TCB

parent 9c16224e
Branches master
No related tags found
No related merge requests found
......@@ -230,8 +230,10 @@ impl Linker {
if self.next_tls_module_id == 0 {
// Hack to allocate TCB on the first TLS module
unsafe {
let tcb = Tcb::new(master.offset).expect_notls("failed to allocate TCB");
tcb.activate();
if Tcb::current().is_none() {
let tcb = Tcb::new(master.offset).expect_notls("failed to allocate TCB");
tcb.activate();
}
}
}
self.next_tls_module_id += 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment