forked from AbleOS/ableos
forgot to document
This commit is contained in:
parent
9142c02da0
commit
9da66e7b29
sysdata
|
@ -3,6 +3,7 @@ $spawn := fn(proc_exe: ^u8, length: uint): uint {
|
|||
return @eca(3, 6, proc_exe, length)
|
||||
}
|
||||
|
||||
// returns: 0 if child process, child PID if parent process
|
||||
$fork := fn(): uint return @eca(3, 7)
|
||||
|
||||
/* TODO:
|
||||
|
|
Binary file not shown.
|
@ -9,7 +9,11 @@ opaque := fn(ptr: ^bool): bool {
|
|||
return *ptr
|
||||
}
|
||||
|
||||
// axe := @embed("assets/lily.axe")
|
||||
|
||||
test := fn(): uint {
|
||||
// process.spawn(@bitcast(&axe), @sizeof(@TypeOf(axe)))
|
||||
|
||||
a: ^bool = @bitcast(memory.request_page(1, true))
|
||||
x := process.fork()
|
||||
log.info("both will print this")
|
||||
|
@ -19,7 +23,7 @@ test := fn(): uint {
|
|||
// ! NOTE: NEVER DO THIS!!! USE BUFFERS INSTEAD!!! :)
|
||||
// acts as a lock. when parent is done, this can go ahead.
|
||||
loop if opaque(a) break else {
|
||||
};
|
||||
}
|
||||
log.info("child done.")
|
||||
} else {
|
||||
*a = true
|
||||
|
|
Loading…
Reference in a new issue