mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
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:
parent
4e62cefa6e
commit
fec396037a
43 changed files with 850 additions and 532 deletions
|
@ -119,7 +119,7 @@ static privileged dontinline int arch_prctl_xnu(int code, int64_t addr) {
|
|||
case ARCH_SET_GS:
|
||||
asm volatile(CFLAG_ASM("syscall")
|
||||
: CFLAG_CONSTRAINT(failed), "=a"(ax)
|
||||
: "1"(0x3000003), "D"(addr - 0x8a0 /* wat */)
|
||||
: "1"(0x3000003), "D"(addr - 0x30)
|
||||
: "rcx", "r11", "memory", "cc");
|
||||
if (failed) errno = ax, ax = -1;
|
||||
return ax;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue