Merge "adb: make darwin build with thread safety analysis."

This commit is contained in:
Josh Gao 2017-05-04 23:05:37 +00:00 committed by Gerrit Code Review
commit 971e6585a6
1 changed files with 2 additions and 1 deletions

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();