|
GitOS
|
#include <drivers/graphics/vbe/vbe_graphics.hpp>#include "common/status.h"#include "common/string.h"#include "fs/file.h"#include "kernel.h"#include "memory/heap/kheap.h"#include "memory/memory.h"#include "memory/paging/paging.h"#include "process.h"#include "task.h"#include "formats/elf/ELFFile.hpp"Functions | |
| struct process * | process_current () |
| struct process * | process_get (int process_id) |
| int | process_switch (struct process *process) |
| int | elf_load (const char *filename, ELFFile **elf_file) |
| int | process_map_memory (struct process *process) |
| int | process_get_free_slot () |
| int | process_load_switch (const char *filename, struct process *process) |
| int | process_get_next_allocation_index (struct process *process) |
| int | process_load_for_slot (const char *filename, struct process *process, int process_slot) |
| int | process_load (const char *filename, struct process *process) |
| void | process_pushkey (struct process *process, char c) |
| char | process_popkey (struct process *process) |
| void * | process_malloc (struct process *process, size_t size) |
| void * | process_malloc_flags (struct process *process, size_t size, int flags) |
| void | process_free (struct process *process, void *address) |
| void | process_terminate (struct process *process) |
| struct process ** | process_get_list () |
Variables | |
| struct process * | current_process = 0 |
| int elf_load | ( | const char * | filename, |
| ELFFile ** | elf_file ) |
| struct process * process_current | ( | ) |
References current_process.
| void process_free | ( | struct process * | process, |
| void * | address ) |
References process::allocations, kfree(), and PROCESS_MAX_ALLOCATIONS.
| struct process * process_get | ( | int | process_id | ) |
References MAX_PROCESSES.
| int process_get_free_slot | ( | ) |
References EISTKN, and MAX_PROCESSES.
| struct process ** process_get_list | ( | ) |
| int process_get_next_allocation_index | ( | struct process * | process | ) |
References process::allocations, ENOMEM, and PROCESS_MAX_ALLOCATIONS.
| int process_load | ( | const char * | filename, |
| struct process * | process ) |
References EISTKN, filename, process_get_free_slot(), and process_load_for_slot().
| int process_load_for_slot | ( | const char * | filename, |
| struct process * | process, | ||
| int | process_slot ) |
References process::bss, EISTKN, process::elf, ENOMEM, ERROR_I, filename, process::filename, process::framebuffer, process::id, ISERR, kfree(), kzalloc(), process_free(), process_get(), process_malloc(), process_map_memory(), PROGRAM_VIRTUAL_STACK_SIZE, process::stack, strncpy(), process::task, task_free(), task_new(), and VBEGraphics::the().
| int process_load_switch | ( | const char * | filename, |
| struct process * | process ) |
References filename, process_load(), and process_switch().
| void * process_malloc | ( | struct process * | process, |
| size_t | size ) |
References PAGING_ACCESS_FROM_ALL, PAGING_IS_PRESENT, PAGING_IS_WRITEABLE, process_malloc_flags(), and size.
| void * process_malloc_flags | ( | struct process * | process, |
| size_t | size, | ||
| int | flags ) |
| int process_map_memory | ( | struct process * | process | ) |
References process::elf, ELFFile::get_header(), ELFFile::get_program_header(), memcpy(), task::page_directory, PAGING_ACCESS_FROM_ALL, paging_align_address(), paging_align_address_to_lower_page(), PAGING_IS_PRESENT, PAGING_IS_WRITEABLE, paging_map_to(), ELFFile::PF_W, process_malloc_flags(), PROGRAM_VIRTUAL_STACK_ADDRESS_END, PROGRAM_VIRTUAL_STACK_SIZE, process::stack, and process::task.
| char process_popkey | ( | struct process * | process | ) |
| void process_pushkey | ( | struct process * | process, |
| char | c ) |
References process::keyboard_buffer::buffer, process::keyboard, and process::keyboard_buffer::tail.
| int process_switch | ( | struct process * | process | ) |
References current_process.
| void process_terminate | ( | struct process * | process | ) |
| struct process* current_process = 0 |