Implement argument_ptr () syscall for handling process arguments
All checks were successful
Build documentation / build-and-deploy (push) Successful in 37s

This commit is contained in:
2026-01-30 14:05:47 +01:00
parent 124aa12f5b
commit 38e26a9c12
10 changed files with 33 additions and 28 deletions

View File

@@ -5,13 +5,15 @@
#include <stddef.h>
#include <stdint.h>
int process_spawn (process_func_t func) {
int process_spawn (process_func_t func, void* argument_ptr) {
void* stack = malloc (PROC_STACK_SIZE);
if (stack == NULL)
return -ST_OOM_ERROR;
uintptr_t top = (uintptr_t)stack + PROC_STACK_SIZE;
return clone (top, func);
return clone (top, func, argument_ptr);
}
int process_quit (void) { return quit (); }
void* process_argument (void) { return argument_ptr (); }