Spawn Processes using memory primitives rather than and elf loader.
This allows us to remove the temporary syscall for that style of process spawn.
This commit is contained in:
parent
b06c76e477
commit
23895b5c6c
26 changed files with 403 additions and 94 deletions
|
|
@ -1,5 +1,31 @@
|
|||
#include "include/mammoth/debug.h"
|
||||
|
||||
#include <zcall.h>
|
||||
#include <zerrors.h>
|
||||
|
||||
void dbgln(const char* str) { ZDebug(str); }
|
||||
void dbgln(const char* str) {
|
||||
// Safe to ignore the result since right now this doesn't throw.
|
||||
uint64_t _ = ZDebug(str);
|
||||
}
|
||||
|
||||
void check(uint64_t code) {
|
||||
switch (code) {
|
||||
case Z_OK:
|
||||
return;
|
||||
case ZE_NOT_FOUND:
|
||||
dbgln("crash: NOT_FOUND");
|
||||
break;
|
||||
case ZE_INVALID:
|
||||
dbgln("crash: INVALID");
|
||||
break;
|
||||
case ZE_DENIED:
|
||||
dbgln("crash: DENIED");
|
||||
break;
|
||||
case ZE_UNIMPLEMENTED:
|
||||
dbgln("crash: UNIMPLEMENTED");
|
||||
default:
|
||||
dbgln("Unhandled code");
|
||||
break;
|
||||
}
|
||||
ZProcessExit(code);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue