fix pthread_setname_np on linux
Some checks failed
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Failing after 47s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Failing after 1m2s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Failing after 1m7s
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 1m8s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Failing after 1m11s
linux-x64-gcc / linux-gcc (push) Failing after 58s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Failing after 1m4s
Some checks failed
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Failing after 47s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Failing after 1m2s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Failing after 1m7s
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 1m8s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Failing after 1m11s
linux-x64-gcc / linux-gcc (push) Failing after 58s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Failing after 1m4s
This commit is contained in:
parent
3a7c9d5d19
commit
e17beb8d24
@ -18,7 +18,7 @@ GetTid()
|
||||
class Thread::Impl {
|
||||
public:
|
||||
Impl(const ThreadFunc &func, const std::string &thread_name)
|
||||
: thread_(0),
|
||||
: thread_(nullptr),
|
||||
started_(false),
|
||||
joined_(false),
|
||||
thread_name_(thread_name),
|
||||
@ -39,7 +39,7 @@ public:
|
||||
#if __APPLE__
|
||||
pthread_setname_np(impl->thread_name_.c_str());
|
||||
#else
|
||||
pthread_setname_np(&thread_, impl->thread_name_.c_str());
|
||||
pthread_setname_np(&impl->thread_, impl->thread_name_.c_str());
|
||||
#endif
|
||||
|
||||
impl->latch_.CountDown();
|
||||
|
Loading…
x
Reference in New Issue
Block a user