osdbg: implement thread info api

This commit is contained in:
Michael Scire 2021-07-19 17:35:00 -07:00 committed by SciresM
parent 9f1f0c7cbd
commit c6fad1b0ee
19 changed files with 912 additions and 7 deletions

View file

@ -31,6 +31,8 @@ namespace ams::os::impl {
util::ConstructAt(thread->waitlist);
/* Set member variables. */
thread->magic = os::ThreadType::Magic;
thread->version = 0;
thread->thread_impl = (thread_impl != nullptr) ? thread_impl : std::addressof(thread->thread_impl_storage);
thread->function = function;
thread->argument = arg;
@ -134,6 +136,7 @@ namespace ams::os::impl {
util::DestroyAt(thread->waitlist);
thread->name_buffer[0] = '\x00';
thread->magic = 0xCCCC;
{
std::scoped_lock tlk(this->cs);