summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-25 18:01:18 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-25 18:01:18 +0000
commit9a2744df301c509ea48361016ab441c792ec6d5a (patch)
treeddb8027705abc3fdfd5355b80407ac49811d484b /libc
parent2c256a0f0927abd94f2210b37c18ead210d30477 (diff)
parentd1aea30b2ade504550f7bb7996c808b9af1c415d (diff)
downloadbionic-9a2744df301c509ea48361016ab441c792ec6d5a.zip
bionic-9a2744df301c509ea48361016ab441c792ec6d5a.tar.gz
bionic-9a2744df301c509ea48361016ab441c792ec6d5a.tar.bz2
Merge "Fix POSIX timer thread naming."
Diffstat (limited to 'libc')
-rw-r--r--libc/bionic/posix_timers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/bionic/posix_timers.cpp b/libc/bionic/posix_timers.cpp
index bc3aeb2..c8f71c8 100644
--- a/libc/bionic/posix_timers.cpp
+++ b/libc/bionic/posix_timers.cpp
@@ -174,10 +174,10 @@ int timer_create(clockid_t clock_id, sigevent* evp, timer_t* timer_id) {
return -1;
}
- // Give the thread a meaningful name.
+ // Give the thread a specific meaningful name.
// It can't do this itself because the kernel timer isn't created until after it's running.
- char name[32];
- snprintf(name, sizeof(name), "POSIX interval timer %d", to_kernel_timer_id(timer));
+ char name[16]; // 16 is the kernel-imposed limit.
+ snprintf(name, sizeof(name), "POSIX timer %d", to_kernel_timer_id(timer));
pthread_setname_np(timer->callback_thread, name);
*timer_id = timer;