Don't use Fwmark to rename threads
Use the least 16 significant bits, which are supposed to represent
netId, of the network mark for resolver threads name. This is in
preparation for dropping Fwmark used in DnsResolver.
No naming rule change.
Bug: 151895202
Test: adb shell ps -AT $(adb shell pidof netd)
Change-Id: Ie1724dc5775cdeff6ee00a51b5f74e8f8a32d5d3
diff --git a/PrivateDnsConfiguration.cpp b/PrivateDnsConfiguration.cpp
index 2263153..182a5ac 100644
--- a/PrivateDnsConfiguration.cpp
+++ b/PrivateDnsConfiguration.cpp
@@ -31,6 +31,8 @@
#include "resolv_cache.h"
#include "util.h"
+using android::base::StringPrintf;
+using android::netdutils::setThreadName;
using std::chrono::milliseconds;
namespace android {
@@ -180,7 +182,7 @@
// Note that capturing |server| and |netId| in this lambda create copies.
std::thread validate_thread([this, server, netId, mark] {
- netdutils::setThreadName(android::base::StringPrintf("TlsVerify_%u", netId).c_str());
+ setThreadName(StringPrintf("TlsVerify_%u", netId).c_str());
// cat /proc/sys/net/ipv4/tcp_syn_retries yields "6".
//