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 processprocess
 
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.
 

Detailed Description

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.

Field Documentation

◆ context

thread_context_t thread::context

This includes registers, and information that must be kept for when switching back into the thread.

◆ flags

u32 thread::flags

Combination of thread_flags values

◆ process

struct process* thread::process

Containing process

◆ state

thread_state_t thread::state

Thread's current state, used by the scheduler

◆ this_global

node_t thread::this_global

Used by the global list of alive processes

◆ this_proc

node_t thread::this_proc

Used by a process to list threads

◆ this_sched

node_t thread::this_sched

Used by the scheduler

◆ tid

pid_t thread::tid

Thread ID

◆ wakeup

clock_t thread::wakeup

Time when it should wakeup (in ticks)


The documentation for this struct was generated from the following file: