Get threads working on all platforms

We now have a high-quality clone() implementation for creating
lightweight threads on Linux/Windows/FreeBSD/NetBSD/OpenBSD.
This commit is contained in:
Justine Tunney 2022-05-12 17:52:13 -07:00
parent 4e62cefa6e
commit fec396037a
43 changed files with 850 additions and 532 deletions

View file

@ -1,2 +1,12 @@
.include "o/libc/nt/codegen.inc"
.imp kernel32,__imp_TerminateThread,TerminateThread,0
.text.windows
TerminateThread:
push %rbp
mov %rsp,%rbp
.profilable
mov __imp_TerminateThread(%rip),%rax
jmp __sysv2nt
.endfn TerminateThread,globl
.previous