#include <task.h>
#include <thread.h>
#include <vm.h>
#include <x86/proc_reg.h>
#include <malloc.h>
#include <elf.h>
#include <string.h>
Functions | |
int | task_manager_initialize (void) |
Initializes the task manager. | |
Task * | task_current (void) |
Gets the currently running task. | |
Task * | task_create (Task *parentTask) |
Creates a new task. | |
void | task_destroy (Task *task) |
Destroys a task. | |
void | task_exit (Task *task) |
Free resources for an exiting task. | |
Task * | task_fork (void) |
Forks a task. | |
int | task_exec (Task *task, char *execname, char **execvec) |
Variables | |
Task * | initTask |
char | execnameBuffer [EXECNAME_LIMIT] |
char | execvecBuffer [EXECVEC_BUFFER_LIMIT] |
char * | execvecArgv [EXECVEC_ARGV_LIMIT] |
Hassaan Moin Khan (hkhan)
|
Creates a new task. Creates a new task and inserts it to the back of the list
|
|
Gets the currently running task. returns the task of the currently running thread
|
|
Destroys a task. Kills a task that was in the list of tasks
|
|
Free resources for an exiting task. This should be called once the last thread of a task has exited to free any resources associated with the task and wake any threads waiting for it to complete.
|
|
Forks a task. Forks a new task that is a copy of the current task
|
|
Initializes the task manager. runs the init task
|