mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-11-17 11:24:36 +01:00
named_thread: install atomic wait callback
This commit is contained in:
1 parent
1668d6ee1b
commit
faba366f89
2 files changed
+72
-13
No files matched your search
+12
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user