45 static void __processDestroy(
struct object *obj);
46 static void __processShutdown(
struct object *obj, uint32_t
mode);
47 static int32_t __processGetStatus(
struct object *obj,
UNUSED uint32_t
mode);
48 static struct linkedList *__processWait(
struct object *obj,
UNUSED uint32_t
mode, uint32_t *result);
86 __objectInit(&p->
obj, &processFunctions);
127 static void __processDestroy(
struct object *
obj)
167 static void __processShutdown(
struct object *obj, uint32_t
exitcode)
215 static int32_t __processGetStatus(
struct object *obj,
UNUSED uint32_t
mode)
232 static struct linkedList *__processWait(
struct object *obj,
UNUSED uint32_t
mode, uint32_t *result)
void pagingReleaseProcessPageTable(struct process *p)
Releases the page directory and page table of a specific process.
#define USERMODE_IDT_ADDRESS
struct process * processCreate(struct process *original)
Creates a new kernel process object.
const struct objectFunctions * functions
void * heapAlloc(uint32_t length)
Allocates a block of kernel memory.
void pagingAllocProcessPageTable(struct process *p)
Allocates the page directory and page table for a specific process.
void * user_programArgumentsBase
#define objectShutdown(p, a)
#define USERMODE_GDT_ADDRESS
void handleTableInit(struct handleTable *table)
Initializes the handle table structure which is part of each process.
uint32_t processCount()
Returns the number of total processes in the system.
void handleForkTable(struct handleTable *destination, struct handleTable *source)
Forks a handle table.
void heapFree(void *addr)
Deallocates a block of kernel memory.
uint32_t numberOfTotalThreads
struct pagingEntry * pageDirectory
uint32_t handleCount(struct handleTable *table)
Returns the number of handles in a handletable.
uint32_t processInfo(struct processInfo *info, uint32_t count)
Fills out the processInfo structure with information about each individual process.
#define LL_INIT(list)
Initializes a linkedList.
uint32_t user_environmentVariablesLength
void handleTableFree(struct handleTable *table)
Releases the memory of the handle table and all associated objects.
#define USERMODE_KERNELSTACK_ADDRESS
struct linkedList entry_list
uint32_t numberOfBlockedThreads
void * user_environmentVariablesBase
struct linkedList threads
#define objectContainer(p, type, functions)
uint32_t user_programArgumentsLength
struct linkedList entry_process
struct linkedList waiters
struct handleTable handles
struct linkedList processList
#define LL_FOR_EACH_SAFE(element, next_element, list, type, field)
Allows to iterate a linkedList similar to a for-loop (safe when deleting elements).
void pagingForkProcessPageTable(struct process *destination, struct process *source)
Duplicate a page table and assigns it to a destination process.
void pagingFillProcessInfo(struct process *p, struct processInfo *info)
Fills out all memory related fields in the processInfo structure.
#define USERMODE_TASK_ADDRESS
#define LL_FOR_EACH(element, list, type, field)
Allows to iterate a linkedList similar to a for-loop.
void * pagingMapRemoteMemory(struct process *dst_p, struct process *src_p, void *dst_addr, void *src_addr, uint32_t length, bool rw, bool user)
Maps some virtual memory from one process to another one.
#define USERMODE_INTJMP_ADDRESS