Files
mop3/libprocess/process.c
2026-02-21 11:52:33 +01:00

16 lines
366 B
C

#include <liballoc.h>
#include <m/status.h>
#include <process.h>
#include <stddef.h>
#include <stdint.h>
#include <system.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);
}