Added stack specific flags for thread stack allocation

This commit is contained in:
Eduard Urbach 2025-02-02 15:17:52 +01:00
parent a0388ae15a
commit 819a4a907b
Signed by: eduard
GPG key ID: 49226B848C78F6C8

View file

@ -1,10 +0,0 @@
import mem
import sys
create(func Pointer) -> Int {
size := 4096
stack := mem.alloc(size)
rip := stack + size - 8
store(rip, 8, func)
return sys.clone(0x100|0x200|0x400|0x800|0x8000|0x10000|0x80000000, rip)
}