summaryrefslogtreecommitdiffstats
path: root/adb/transport.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-08-31 10:46:05 -0700
committerElliott Hughes <enh@google.com>2015-08-31 10:46:05 -0700
commit0c3914a44d608614a2cf5225e0072f41b2910d3c (patch)
tree284ea25380ce7be5e675201bbec0e899cd17b5e5 /adb/transport.cpp
parentc9525ec366232aa6a0968be1cc8e8abc37df789f (diff)
downloadcore-0c3914a44d608614a2cf5225e0072f41b2910d3c.tar.gz
core-0c3914a44d608614a2cf5225e0072f41b2910d3c.tar.bz2
core-0c3914a44d608614a2cf5225e0072f41b2910d3c.zip
Distinguish transport threads.
Use "<-" and "->" to work around Linux's very short thread name limit. Bug: http://b/23423333 Change-Id: I9f3f096415b47162dacb660cd0a97ac7ff6107e6
Diffstat (limited to 'adb/transport.cpp')
-rw-r--r--adb/transport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/transport.cpp b/adb/transport.cpp
index bd3bf1663..43691dcd9 100644
--- a/adb/transport.cpp
+++ b/adb/transport.cpp
@@ -193,7 +193,7 @@ static void *output_thread(void *_t)
atransport *t = reinterpret_cast<atransport*>(_t);
apacket *p;
- adb_thread_setname("to transport");
+ adb_thread_setname(android::base::StringPrintf("->%s", t->serial));
D("%s: starting transport output thread on fd %d, SYNC online (%d)\n",
t->serial, t->fd, t->sync_token + 1);
p = get_apacket();
@@ -250,7 +250,7 @@ static void *input_thread(void *_t)
apacket *p;
int active = 0;
- adb_thread_setname("from transport");
+ adb_thread_setname(android::base::StringPrintf("<-%s", t->serial));
D("%s: starting transport input thread, reading from fd %d\n",
t->serial, t->fd);