Aufgrund einer Wartung wird GitLab am 26.10. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 26.10. between 8:00 and 9:00 am.

Commit 98dccd8a authored by Stefan Lankes's avatar Stefan Lankes Committed by Stefan Lankes
Browse files

create TLS only if TLS isn't already initialized

parent b8068482
......@@ -343,11 +343,10 @@ impl TaskFrame for Task {
fn create_stack_frame(&mut self, func: extern "C" fn(usize), arg: usize) {
// Check if the task (process or thread) uses Thread-Local-Storage.
let tls_size = environment::get_tls_memsz();
self.tls = if tls_size > 0 {
Some(TaskTLS::new(tls_size))
} else {
None
};
// check is TLS is already allocated
if self.tls.is_none() && tls_size > 0 {
self.tls = Some(TaskTLS::new(tls_size))
}
unsafe {
// Set a marker for debugging at the very top.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment