Add missing files
This commit is contained in:
23
os/process.h
Normal file
23
os/process.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef PROCESS_H
|
||||
#include <stdint.h>
|
||||
|
||||
#define PROCESS_H
|
||||
#define MAX_PROCESS 16
|
||||
|
||||
#define STACK_SIZE 32
|
||||
#define STACK_START(stack) (&stack[STACK_SIZE-1])
|
||||
|
||||
typedef struct {
|
||||
int (*entrypoint)();
|
||||
uint32_t stack[STACK_SIZE];
|
||||
} Process;
|
||||
|
||||
typedef struct {
|
||||
Process process_list[MAX_PROCESS];
|
||||
int entries;
|
||||
} ProcessTable;
|
||||
|
||||
void create_process_table(ProcessTable **table);
|
||||
|
||||
int create_process(ProcessTable *table, void *entrypoint);
|
||||
#endif
|
||||
Reference in New Issue
Block a user