|
My Kernel v0.1.0
|
A single thread. More...
#include <process.h>
Data Fields | |
| thread_context_t | context |
| Arch specific thread context. More... | |
| thread_state_t | state |
| pid_t | tid |
| u32 | flags |
| struct process * | process |
| node_t | this_proc |
| node_t | this_sched |
| node_t | this_global |
| union { | |
| struct { | |
| clock_t wakeup | |
| } sleep | |
| For sleeping threads only. | |
| }; | |
| Information relative to the current state of the thread. | |
The struct contains information about the thread's execution state. This state is architecture dependant, so its actual definition is present inside the arch specific process header file.
Generic information about a thread include its current state (used by the scheduler), information about its containing process and feature flags.
| thread_context_t thread::context |
This includes registers, and information that must be kept for when switching back into the thread.
| u32 thread::flags |
Combination of thread_flags values
| struct process* thread::process |
Containing process
| thread_state_t thread::state |
Thread's current state, used by the scheduler
| node_t thread::this_global |
Used by the global list of alive processes
| node_t thread::this_proc |
Used by a process to list threads
| node_t thread::this_sched |
Used by the scheduler
| pid_t thread::tid |
Thread ID
| clock_t thread::wakeup |
Time when it should wakeup (in ticks)