Compare commits
1 commit
8e387dc156
...
0bce00edc2
Author | SHA1 | Date | |
---|---|---|---|
0bce00edc2 |
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ void SetCurrentThreadName(const char* name) {
|
|||
// attempt to set a longer name with ERANGE.
|
||||
char buf[16];
|
||||
size_t const len = std::min<size_t>(std::strlen(name), sizeof(buf) - 1);
|
||||
std::memcpy(buf, name, len);
|
||||
std::memcpy(truncated, name, len);
|
||||
buf[len] = '\0';
|
||||
pthread_setname_np(pthread_self(), buf);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue