Go to the documentation of this file.
69 void tasking_create_task(
void* eip,
void*
cr3,
char kmode,
char param1_exists,
void* param1_arg,
char param2_exists,
void* param2_arg,
char isThread);
Thread * current_thread
Currently running thread.
Definition: tasking.c:22
struct Thread * prevThreadInProcess
The previous thread in the process.
Definition: tasking.h:50
int numThreadsBlocked
The number of blocked threads in this process.
Definition: tasking.h:35
thread_state state
The state of this thread. (running,ready to run,blocked,etc.)
Definition: tasking.h:47
int * tasking_get_errno_address()
Definition: tasking.c:157
int numThreads
The number of threads in this process.
Definition: tasking.h:34
void tasking_yield()
Definition: tasking.c:228
struct Thread * firstThread
A pointer to the head of the linked list of threads for this process.
Definition: tasking.h:36
thread_state
Definition: tasking.h:16
@ THREAD_BLOCKED
The state of a generically blocked thread.
Definition: tasking.h:20
@ THREAD_RUNNING
The state of a running thread.
Definition: tasking.h:17
Process * process
The thread's process.
Definition: tasking.h:53
pid_t next_tid
The TID that the next created thread will use.
Definition: tasking.h:33
char tasking_is_privleged()
Definition: tasking.c:149
pid_t tid
The TID of this thread.
Definition: tasking.h:46
void tasking_unblock(pid_t pid, pid_t tid)
Definition: tasking.c:285
void tasking_create_task(void *eip, void *cr3, char kmode, char param1_exists, void *param1_arg, char param2_exists, void *param2_arg, char isThread)
Definition: tasking.c:62
pid_t tasking_get_PID()
Definition: tasking.c:153
void tasking_exit(int code)
Definition: tasking.c:318
@ THREAD_EXITED
The state of an exited thread.
Definition: tasking.h:19
struct Thread * nextReadyToRun
If the thread is in the ready to run list, this is the next ready to run thread. (potentially in a di...
Definition: tasking.h:51
char priv
Whether the process is privileged (can execute syscalls to acesss all of memory/has acess to IO ports...
Definition: tasking.h:31
void * kernel_esp
The thread's kernel stack.
Definition: tasking.h:43
struct Thread * prevReadyToRun
If the thread is in the ready to run list, this is the previous ready to run thread....
Definition: tasking.h:52
void tasking_block(thread_state newstate)
Definition: tasking.c:255
pid_t pid
The PID of this process.
Definition: tasking.h:32
pid_t tasking_new_thread(void *start, pid_t pid, char param_exists, void *param_arg)
Definition: tasking.c:161
int errno
The errno value for this thread.
Definition: tasking.h:48
void tasking_init()
Definition: tasking.c:145
void * kernel_esp_top
The top of the thread's kernel stack.
Definition: tasking.h:44
struct Thread * nextThreadInProcess
The next thread in the process.
Definition: tasking.h:49
@ THREAD_READY
The state of a ready to run thread.
Definition: tasking.h:18
void * cr3
The address space of this thread. (it is in here and not in the process to simplify the task switch a...
Definition: tasking.h:45