summaryrefslogtreecommitdiffstats
path: root/adb/usb_linux.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-02-12 14:31:15 -0800
committerJosh Gao <jmgao@google.com>2016-02-12 15:23:54 -0800
commitb5fea14e13bb6e41b36f374c954dc55faeef4627 (patch)
tree45ca9af113dedf1859237847583acb352aa7838e /adb/usb_linux.cpp
parentdda68c0fcfe4ced4ae410821c7681f02a2b9aff2 (diff)
downloadsystem_core-b5fea14e13bb6e41b36f374c954dc55faeef4627.tar.gz
system_core-b5fea14e13bb6e41b36f374c954dc55faeef4627.tar.bz2
system_core-b5fea14e13bb6e41b36f374c954dc55faeef4627.zip
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
Diffstat (limited to 'adb/usb_linux.cpp')
-rw-r--r--adb/usb_linux.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/adb/usb_linux.cpp b/adb/usb_linux.cpp
index ed5d2d67e..500898a70 100644
--- a/adb/usb_linux.cpp
+++ b/adb/usb_linux.cpp
@@ -571,7 +571,7 @@ static void register_device(const char* dev_name, const char* dev_path,
register_usb_transport(done_usb, serial.c_str(), dev_path, done_usb->writeable);
}
-static void* device_poll_thread(void* unused) {
+static void device_poll_thread(void*) {
adb_thread_setname("device poll");
D("Created device thread");
while (true) {
@@ -580,7 +580,6 @@ static void* device_poll_thread(void* unused) {
kick_disconnected_devices();
sleep(1);
}
- return nullptr;
}
void usb_init() {