matos/core/process.h
2024-01-26 22:23:58 +01:00

21 lines
693 B
C

#pragma once
#include "thread.h"
#define PROCESS_NAME_MAX_LENGTH 32
struct process;
int processSetup();
struct process *processCreate(char *name);
int processCountThread(struct process *proc);
void processListPrint();
int processRef(struct process *proc);
int processUnref(struct process *proc);
int processSetName(struct process *proc, char *name);
char *processGetName(struct process *proc);
int processAddThread(struct process *proc, struct thread *th);
int processRemoveThread(struct thread *th);
struct mmu_context *processGetMMUContext(struct process *th);
struct uAddrSpace *processGetAddrSpace(struct process *proc);
int processInitHeap(struct process *proc, uaddr_t lastUserAddr);