adb: make adb_thread_func_t return void, add adb_thread_exit.
Windows restricts the return value of threads to 32-bits, even on 64-bit
platforms. Since we don't actually return meaningful values from thread,
resolve this inconsistency with POSIX by making adb's thread abstraction
only take void functions.
Change-Id: I5c23b4432314f13bf16d606fd5e6b6b7b6ef98b5
diff --git a/adb/shell_service.cpp b/adb/shell_service.cpp
index d080e09..f84447f 100644
--- a/adb/shell_service.cpp
+++ b/adb/shell_service.cpp
@@ -198,7 +198,7 @@
// Opens the file at |pts_name|.
int OpenPtyChildFd(const char* pts_name, ScopedFd* error_sfd);
- static void* ThreadHandler(void* userdata);
+ static void ThreadHandler(void* userdata);
void PassDataStreams();
void WaitForExit();
@@ -465,7 +465,7 @@
return child_fd;
}
-void* Subprocess::ThreadHandler(void* userdata) {
+void Subprocess::ThreadHandler(void* userdata) {
Subprocess* subprocess = reinterpret_cast<Subprocess*>(userdata);
adb_thread_setname(android::base::StringPrintf(
@@ -475,8 +475,6 @@
D("deleting Subprocess for PID %d", subprocess->pid());
delete subprocess;
-
- return nullptr;
}
void Subprocess::PassDataStreams() {