1
0
Fork 0
forked from AbleOS/ableos

forgot to document

This commit is contained in:
koniifer 2025-01-30 21:26:11 +00:00
parent 9142c02da0
commit 9da66e7b29
3 changed files with 6 additions and 1 deletions
sysdata
libraries/stn/src
programs/test/src/tests/stn

View file

@ -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:

View file

@ -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