void Thread::platform_join()
{
- pthread_join(priv_->handle, 0);
+ pthread_join(_priv->handle, nullptr);
}
void Thread::platform_kill()
{
- pthread_kill(priv_->handle, SIGKILL);
+ pthread_kill(_priv->handle, SIGKILL);
}
void Thread::platform_launch()
{
- pthread_create(&priv_->handle, 0, &Private::main_wrapper, this);
+ pthread_create(&_priv->handle, nullptr, &Private::main_wrapper, this);
+}
+
+void Thread::platform_setname()
+{
+#if defined(__GLIBC__) && (__GLIBC__>2 || (__GLIBC__==2 && __GLIBC_MINOR__>=12))
+ if(!_name.empty())
+ pthread_setname_np(_priv->handle, _name.c_str());
+#endif
}
} // namespace Msp