mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Make fixes and improvements
- clock_nanosleep() is now much faster on OpenBSD and NetBSD - Thread joining is now much faster on NetBSD - FreeBSD timestamps are now more accurate - Thread spawning now goes faster on XNU - Clean up the clone() code
This commit is contained in:
parent
aee50b1327
commit
b407327972
47 changed files with 645 additions and 306 deletions
|
@ -28,7 +28,7 @@
|
|||
// @param r8 is tls
|
||||
// @param r9 is func(void*,int)→int
|
||||
// @param 8(rsp) is arg
|
||||
// @return tid of child on success, or -1 w/ errno
|
||||
// @return tid of child on success, or -errno on error
|
||||
sys_clone_linux:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
|
@ -39,13 +39,9 @@ sys_clone_linux:
|
|||
syscall
|
||||
test %rax,%rax
|
||||
jz 2f
|
||||
cmp $-4095,%rax
|
||||
jae 1f
|
||||
0: pop %rbx
|
||||
pop %rbp
|
||||
ret
|
||||
1: call systemfive_error
|
||||
jmp 0b
|
||||
2: xor %ebp,%ebp # child thread
|
||||
mov %rbx,%rdi # arg
|
||||
mov (%r10),%esi # tid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue