mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
set FS register to 0 if no TLS is needed
This commit is contained in:
parent
b325b8de18
commit
68bac65eef
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ static int thread_entry(void* arg, size_t ep)
|
|||
// copy default TLS segment to stack
|
||||
offset -= curr_task->tls_size;
|
||||
memcpy((void*) (stack+offset), (void*) curr_task->tls_addr, curr_task->tls_size);
|
||||
}
|
||||
} else writefs(0); // no TLS => clear fs register
|
||||
|
||||
// set first argument
|
||||
asm volatile ("mov %0, %%rdi" :: "r"(arg));
|
||||
|
|
Loading…
Add table
Reference in a new issue