MOS Source Code
Loading...
Searching...
No Matches
Thread Struct Reference

#include <task_types.hpp>

Inheritance diagram for Thread:
Collaboration diagram for Thread:

Public Member Functions

 ~Thread ()

Static Public Member Functions

static bool IsValid (const Thread *thread)

Public Attributes

u32 magic
tid_t tid
mos::string name
Processowner
 as_linked_list
 node in the process's thread list
thread_mode mode
 user-mode thread or kernel-mode
spinlock_t state_lock
 protects the thread state
thread_state_t state
 thread state
downwards_stack_t u_stack
 user-mode stack
downwards_stack_t k_stack
 kernel-mode stack
platform_thread_options_t platform_options
 platform-specific thread options
waitlist_t waiters
 list of threads waiting for this thread to exit
thread_signal_info_t signal_info

Friends

mos::SyslogStreamWriter operator<< (mos::SyslogStreamWriter stream, const Thread *thread)

Additional Inherited Members

Static Public Attributes inherited from NamedType<"Thread">
static constexpr mos::string_view type_name

Detailed Description

Definition at line 113 of file task_types.hpp.

Constructor & Destructor Documentation

◆ ~Thread()

~Thread ( )

Definition at line 32 of file thread.cpp.

Member Function Documentation

◆ IsValid()

◆ operator<<

mos::SyslogStreamWriter operator<< ( mos::SyslogStreamWriter stream,
const Thread * thread )
friend

Definition at line 142 of file task_types.hpp.

Member Data Documentation

◆ magic

u32 magic

Definition at line 115 of file task_types.hpp.

◆ tid

tid_t tid

Definition at line 116 of file task_types.hpp.

Referenced by operator<<, thread_complete_init(), and thread_destroy().

◆ name

Definition at line 117 of file task_types.hpp.

Referenced by MOS_STATIC_ASSERT(), MOS_STATIC_ASSERT(), and operator<<.

◆ owner

◆ as_linked_list

as_linked_list

node in the process's thread list

Definition at line 119 of file task_types.hpp.

◆ mode

◆ state_lock

spinlock_t state_lock

protects the thread state

Definition at line 121 of file task_types.hpp.

Referenced by naive_sched_select_next(), process_destroy(), scheduler_wake_thread(), and thread_destroy().

◆ state

◆ u_stack

◆ k_stack

◆ platform_options

◆ waiters

waitlist_t waiters

list of threads waiting for this thread to exit

Definition at line 128 of file task_types.hpp.

◆ signal_info

thread_signal_info_t signal_info

Definition at line 130 of file task_types.hpp.

Referenced by signal_send_to_thread().


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