Files
mop3/libprocess/process.c
kamkow1 58c515e90a
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m21s
Create libioutil, implement a filewriter
2026-03-02 22:47:10 +01:00

18 lines
404 B
C

#include <liballoc.h>
#include <map.h>
#include <page_size.h>
#include <process.h>
#include <status.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);
}