Add missing files
This commit is contained in:
15
os/process.c
Normal file
15
os/process.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "process.h"
|
||||
#include "alloc.h"
|
||||
|
||||
void create_process_table(ProcessTable **table) {
|
||||
*table = malloc(sizeof(ProcessTable));
|
||||
(*table)->entries = 0;
|
||||
}
|
||||
|
||||
int create_process(ProcessTable *table, void *entrypoint) {
|
||||
if (table->entries>=MAX_PROCESS) return 1;
|
||||
|
||||
Process *pentry = &table->process_list[table->entries++];
|
||||
pentry->entrypoint = entrypoint;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user