MOS Source Code
Loading...
Searching...
No Matches
thread.hpp File Reference
#include <mos/hashmap.hpp>
#include <mos/tasks/task_types.hpp>
#include <mos/types.h>
+ Include dependency graph for thread.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

should_inline bool thread_is_valid (const Thread *thread)
 
Threadthread_allocate (Process *owner, thread_mode tflags)
 
void thread_destroy (Thread *thread)
 
PtrResult< Threadthread_new (Process *owner, thread_mode mode, mos::string_view name, size_t stack_size, void *stack)
 
Threadthread_complete_init (Thread *thread)
 
Threadthread_get (tid_t id)
 
bool thread_wait_for_tid (tid_t tid)
 
void thread_exit (Thread *&&t)
 
void thread_exit_locked (Thread *&&t)
 

Variables

mos::HashMap< tid_t, Thread * > thread_table
 

Function Documentation

◆ thread_is_valid()

◆ thread_allocate()

Thread * thread_allocate ( Process * owner,
thread_mode tflags )

Definition at line 37 of file thread.cpp.

Referenced by process_do_fork(), and thread_new().

+ Here is the call graph for this function:

◆ thread_destroy()

void thread_destroy ( Thread * thread)

Definition at line 52 of file thread.cpp.

Referenced by process_destroy(), process_do_execveat(), process_exit(), and thread_new().

+ Here is the call graph for this function:

◆ thread_new()

PtrResult< Thread > thread_new ( Process * owner,
thread_mode mode,
mos::string_view name,
size_t stack_size,
void * stack )

Definition at line 77 of file thread.cpp.

Referenced by create_thread(), kthread_create_no_sched(), and process_new().

+ Here is the call graph for this function:

◆ thread_complete_init()

Thread * thread_complete_init ( Thread * thread)

Definition at line 165 of file thread.cpp.

Referenced by create_thread(), elf_create_process(), kthread_create_no_sched(), and process_do_fork().

+ Here is the call graph for this function:

◆ thread_get()

Thread * thread_get ( tid_t id)

Definition at line 174 of file thread.cpp.

Referenced by MOS_STATIC_ASSERT(), MOS_STATIC_ASSERT(), MOS_STATIC_ASSERT(), Console::putc(), thread_wait_for_tid(), and waitlist_wake().

+ Here is the call graph for this function:

◆ thread_wait_for_tid()

bool thread_wait_for_tid ( tid_t tid)

Definition at line 189 of file thread.cpp.

Referenced by MOS_STATIC_ASSERT(), process_do_execveat(), and process_exit().

+ Here is the call graph for this function:

◆ thread_exit()

void thread_exit ( Thread *&& t)

Definition at line 210 of file thread.cpp.

Referenced by MOS_STATIC_ASSERT().

+ Here is the call graph for this function:

◆ thread_exit_locked()

void thread_exit_locked ( Thread *&& t)

Definition at line 217 of file thread.cpp.

Referenced by process_exit(), and thread_exit().

+ Here is the call graph for this function:

Variable Documentation

◆ thread_table

mos::HashMap<tid_t, Thread *> thread_table
extern