X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Funix%2Fthread.cpp;h=42231934c00ed6c58b9e0ec766bee7cecf7f3ebf;hb=HEAD;hp=3c17a9aabc8054c423253c115ba803325dc3de62;hpb=a4596d1c2f627e4568eb6c01d81b6e45f488715a;p=libs%2Fcore.git diff --git a/source/core/unix/thread.cpp b/source/core/unix/thread.cpp index 3c17a9a..4223193 100644 --- a/source/core/unix/thread.cpp +++ b/source/core/unix/thread.cpp @@ -7,23 +7,25 @@ namespace Msp { 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(!name_.empty()) - pthread_setname_np(priv_->handle, name_.c_str()); +#if defined(__GLIBC__) && (__GLIBC__>2 || (__GLIBC__==2 && __GLIBC_MINOR__>=12)) + if(!_name.empty()) + pthread_setname_np(_priv->handle, _name.c_str()); +#endif } } // namespace Msp