summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Glenn Kasten <gkasten@google.com> 2012-02-28 12:30:08 -0800
committer Glenn Kasten <gkasten@google.com> 2012-02-28 16:38:09 -0800
commit86e3362f1589eda1b1604f9d0fa31b3a78ef8aec (patch)
tree227bfe3b3d8b924366b34e5eabfb707d6186e0e0 /libs/binder/ProcessState.cpp
parentf64dfccd96286255fd382486c94cdb48921c45fa (diff)
Shorten thread names
prctl(PR_SET_NAME) limits to 15 characters. Before we had names like "Binder Thread #" and the counter was cut off :-( Also remove redundant "thread" at end of name; it's always a thread. Change-Id: I1f99c2730ba0787ed9b59c15914356cddf698e2f
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index f96fe50e03f3..9fa412ca1f8b 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -286,8 +286,8 @@ void ProcessState::spawnPooledThread(bool isMain)
{
if (mThreadPoolStarted) {
int32_t s = android_atomic_add(1, &mThreadPoolSeq);
- char buf[32];
- sprintf(buf, "Binder Thread #%d", s);
+ char buf[16];
+ snprintf(buf, sizeof(buf), "Binder_%X", s);
ALOGV("Spawning new pooled thread, name=%s\n", buf);
sp<Thread> t = new PoolThread(isMain);
t->run(buf);