Files
mop3/libprocess/process.c
kamkow1 b0b69f3e9e
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m26s
Add sys_exec () and libprocess wrapper, fix ramdisk tar parsing
2026-02-14 21:50:09 +01:00

22 lines
533 B
C

#include <liballoc.h>
#include <m/status.h>
#include <m/system.h>
#include <process.h>
#include <stddef.h>
#include <stdint.h>
int process_spawn (process_func_t func, void* argument_ptr) {
void* stack = malloc (STACK_SIZE);
if (stack == NULL)
return -ST_OOM_ERROR;
uintptr_t top = (uintptr_t)stack + STACK_SIZE;
return clone (top, func, argument_ptr);
}
int process_quit (void) { return quit (); }
void* process_argument (void) { return argument_ptr (); }
int process_exec (const char* path) { return exec (path); }