mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Get threads working well on MacOS Arm64
- Now using 10x better GCD semaphores - We now generate Linux-like thread ids - We now use fast system clock / sleep libraries - The APE M1 loader now generates Linux-like stacks
This commit is contained in:
parent
b5eab2b0b7
commit
bcf9af94bf
2037 changed files with 4664 additions and 4451 deletions
|
@ -90,13 +90,18 @@ sched_yield:
|
|||
|
||||
#elif defined(__aarch64__)
|
||||
|
||||
mov x0,#0
|
||||
mov x1,#0
|
||||
mov x2,#0
|
||||
mov x3,#0
|
||||
mov x8,#0x7c // sched_yield() for linux
|
||||
mov x16,#0x85d // select(0,0,0,0) for xnu
|
||||
stp x29,x30,[sp,-32]!
|
||||
mov x29,sp
|
||||
mov x3,0
|
||||
mov x2,0
|
||||
add x4,sp,16
|
||||
mov x1,0
|
||||
mov w0,0
|
||||
stp xzr,xzr,[sp,16]
|
||||
mov x8,#0x7c // sched_yield() for gnu/systemd
|
||||
mov x16,#0x5d // select(0,0,0,0,&blah) for xnu
|
||||
svc 0
|
||||
ldp x29,x30,[sp],32
|
||||
ret
|
||||
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue