mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 20:28:30 +00:00
Support thread local storage
This commit is contained in:
parent
91ee2b19d4
commit
55de4ca6b5
197 changed files with 1483 additions and 874 deletions
|
@ -47,14 +47,15 @@ errfun() {
|
|||
ERRNO="$2"
|
||||
{
|
||||
printf '#include "libc/macros.internal.h"\n.text.unlikely\n\n'
|
||||
printf '.section .privileged,"ax",@progbits\n\n'
|
||||
printf '%s:' "$NAME"
|
||||
if [ "${#NAME}" -gt 6 ]; then
|
||||
printf '\n'
|
||||
fi
|
||||
printf ' .leafprologue
|
||||
.profilable
|
||||
mov %s(%%rip),%%eax
|
||||
mov %%eax,errno(%%rip)
|
||||
mov %s(%%rip),%%ecx
|
||||
.errno
|
||||
mov %%ecx,(%%rax)
|
||||
push $-1
|
||||
pop %%rax
|
||||
.leafepilogue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue