adb: make darwin build with thread safety analysis.

Test: mma on darwin
Change-Id: I44dfc53fc381e60de83f3bc503691cdb8179ca91
This commit is contained in:
Josh Gao 2017-05-04 15:58:01 -07:00
parent 8fad110bfa
commit 04a8218f09

View file

@ -38,6 +38,7 @@
#include <android-base/logging.h>
#include <android-base/stringprintf.h>
#include <android-base/thread_annotations.h>
#include "adb.h"
#include "transport.h"
@ -429,7 +430,7 @@ static void RunLoopThread() {
VLOG(USB) << "RunLoopThread done";
}
static void usb_cleanup() {
static void usb_cleanup() NO_THREAD_SAFETY_ANALYSIS {
VLOG(USB) << "usb_cleanup";
// Wait until usb operations in RunLoopThread finish, and prevent further operations.
operate_device_lock.lock();