X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcore%2Funix%2Fthread.cpp;h=119d55f0571600a4b57de1bd1fea054acc1fb9d2;hb=292aed8e23ea543b089d5f2a73000de4640befe7;hp=26afeefc4300e0955b52ca72931c1c2b63eb0d16;hpb=b537410dcd5b7e661625b51ee72b15e40045fd18;p=libs%2Fcore.git diff --git a/source/core/unix/thread.cpp b/source/core/unix/thread.cpp index 26afeef..119d55f 100644 --- a/source/core/unix/thread.cpp +++ b/source/core/unix/thread.cpp @@ -20,4 +20,12 @@ void Thread::platform_launch() pthread_create(&priv_->handle, 0, &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