MOS Source Code
Loading...
Searching...
No Matches
thread.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
5#include <mos/hashmap.hpp>
7#include <mos/types.h>
8
9typedef struct _hashmap hashmap_t;
10
12
14void thread_destroy(Thread *thread);
15
16PtrResult<Thread> thread_new(Process *owner, thread_mode mode, mos::string_view name, size_t stack_size, void *stack);
20
21[[noreturn]] void thread_exit(Thread *&&t);
22[[noreturn]] void thread_exit_locked(Thread *&&t);
thread_mode
void define_syscall thread_exit(void)
Definition ksyscall.cpp:193
basic_string_view< char > string_view
const char * name
Definition slab.cpp:33
void thread_destroy(Thread *thread)
Definition thread.cpp:52
Thread * thread_get(tid_t id)
Definition thread.cpp:174
mos::HashMap< tid_t, Thread * > thread_table
Definition thread.cpp:24
Thread * thread_allocate(Process *owner, thread_mode tflags)
Definition thread.cpp:37
bool thread_wait_for_tid(tid_t tid)
Definition thread.cpp:189
PtrResult< Thread > thread_new(Process *owner, thread_mode mode, mos::string_view name, size_t stack_size, void *stack)
Definition thread.cpp:77
void thread_exit_locked(Thread *&&t)
Definition thread.cpp:217
Thread * thread_complete_init(Thread *thread)
Definition thread.cpp:165
s32 tid_t
Definition types.h:75