mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 21:38:01 +03:00
named_thread: install atomic wait callback
This commit is contained in:
parent
1668d6ee1b
commit
faba366f89
2 changed files with 72 additions and 13 deletions
|
@ -1667,11 +1667,14 @@ void thread_base::start(native_entry entry)
|
|||
#endif
|
||||
}
|
||||
|
||||
void thread_base::initialize()
|
||||
void thread_base::initialize(bool(*wait_cb)(const void*))
|
||||
{
|
||||
// Initialize TLS variable
|
||||
thread_ctrl::g_tls_this_thread = this;
|
||||
|
||||
// Initialize atomic wait callback
|
||||
atomic_storage_futex::set_wait_callback(wait_cb);
|
||||
|
||||
g_tls_log_prefix = []
|
||||
{
|
||||
return thread_ctrl::g_tls_this_thread->m_name.get();
|
||||
|
@ -1718,6 +1721,14 @@ void thread_base::initialize()
|
|||
#endif
|
||||
}
|
||||
|
||||
void thread_base::notify_abort() noexcept
|
||||
{
|
||||
// For now
|
||||
notify();
|
||||
|
||||
atomic_storage_futex::raw_notify(+m_state_notifier);
|
||||
}
|
||||
|
||||
bool thread_base::finalize(int) noexcept
|
||||
{
|
||||
// Report pending errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue