![]() |
MOS Source Code
|
#include "mos/assert.hpp"
#include "mos/lib/sync/spinlock.hpp"
#include "mos/mm/mm.hpp"
#include <errno.h>
#include <limits.h>
#include <mos/lib/structures/hashmap.hpp>
#include <mos/lib/structures/hashmap_common.hpp>
#include <mos/lib/structures/list.hpp>
#include <mos/mm/cow.hpp>
#include <mos/mm/paging/paging.hpp>
#include <mos/platform/platform.hpp>
#include <mos/syslog/printk.hpp>
#include <mos/tasks/process.hpp>
#include <mos/tasks/schedule.hpp>
#include <mos/tasks/task_types.hpp>
#include <mos/tasks/thread.hpp>
#include <mos/tasks/wait.hpp>
#include <mos_stdlib.hpp>
#include <mos_string.hpp>
Go to the source code of this file.
Functions | |
static tid_t | new_thread_id (void) |
Thread * | thread_allocate (Process *owner, thread_mode tflags) |
void | thread_destroy (Thread *thread) |
PtrResult< Thread > | thread_new (Process *owner, thread_mode tmode, mos::string_view name, size_t stack_size, void *explicit_stack_top) |
Thread * | thread_complete_init (Thread *thread) |
Thread * | thread_get (tid_t tid) |
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 |
Definition at line 26 of file thread.cpp.
Referenced by 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().
Definition at line 52 of file thread.cpp.
Referenced by process_destroy(), process_do_execveat(), process_exit(), and thread_new().
PtrResult< Thread > thread_new | ( | Process * | owner, |
thread_mode | tmode, | ||
mos::string_view | name, | ||
size_t | stack_size, | ||
void * | explicit_stack_top ) |
Definition at line 77 of file thread.cpp.
Referenced by create_thread(), kthread_create_no_sched(), and process_new().
Definition at line 165 of file thread.cpp.
Referenced by create_thread(), elf_create_process(), kthread_create_no_sched(), and process_do_fork().
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().
Definition at line 189 of file thread.cpp.
Referenced by MOS_STATIC_ASSERT(), process_do_execveat(), and process_exit().
Definition at line 210 of file thread.cpp.
Referenced by MOS_STATIC_ASSERT().
Definition at line 217 of file thread.cpp.
Referenced by process_exit(), and thread_exit().
mos::HashMap<tid_t, Thread *> thread_table |
Definition at line 24 of file thread.cpp.
Referenced by process_exit(), tasks_sysfs_thread_list(), thread_complete_init(), thread_destroy(), and thread_get().