Flatten libs
All checks were successful
Build documentation / build-and-deploy (push) Successful in 44s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 44s
This commit is contained in:
19
libprocess/process.c
Normal file
19
libprocess/process.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#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 (); }
|
||||
Reference in New Issue
Block a user