Added a program init function
This commit is contained in:
parent
0ddaeca844
commit
9da25da525
11 changed files with 78 additions and 38 deletions
|
@ -1,3 +1,4 @@
|
|||
import core
|
||||
import sys
|
||||
|
||||
const clone {
|
||||
|
@ -15,7 +16,7 @@ create(func *Any) -> Int {
|
|||
stack := sys.mmap(0, size, 0x1|0x2, 0x02|0x20|0x100|0x20000)
|
||||
stack += size
|
||||
stack -= 8
|
||||
store(stack, 8, _exit)
|
||||
store(stack, 8, core.exit)
|
||||
stack -= 8
|
||||
store(stack, 8, func)
|
||||
return sys.clone(clone.vm|clone.fs|clone.files|clone.sighand|clone.parent|clone.thread|clone.io, stack)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue