Homebrew atomic_ptr rewritten (util/shared_ptr.hpp)

It's analogous to C++20 atomic std::shared_ptr

The following things brought into global namespace:
single_ptr
shared_ptr
atomic_ptr
make_single
This commit is contained in:
Nekotekina 2020-11-26 12:30:51 +03:00
parent bd90e3e37f
commit b5d498ffda
15 changed files with 732 additions and 597 deletions

View file

@ -548,7 +548,7 @@ error_code sys_ppu_thread_rename(ppu_thread& ppu, u32 thread_id, vm::cptr<char>
const auto pname = name.get_ptr();
// Make valid name
auto _name = stx::shared_cptr<std::string>::make(pname, std::find(pname, pname + max_size, '\0'));
auto _name = make_single<std::string>(pname, std::find(pname, pname + max_size, '\0'));
// thread_ctrl name is not changed (TODO)
sys_ppu_thread.warning(u8"sys_ppu_thread_rename(): Thread renamed to “%s”", *_name);