Move to newer clang annotations
Also enable -Wthread-safety-negative.
Changes:
Switch to capabilities and negative capabilities.
Future work:
Use capabilities to implement uninterruptible annotations to work
with AssertNoThreadSuspension.
Bug: 20072211
Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
diff --git a/runtime/jdwp/jdwp_main.cc b/runtime/jdwp/jdwp_main.cc
index 6bc5e27..260abe7 100644
--- a/runtime/jdwp/jdwp_main.cc
+++ b/runtime/jdwp/jdwp_main.cc
@@ -256,12 +256,12 @@
default:
LOG(FATAL) << "Unknown transport: " << options->transport;
}
-
{
/*
* Grab a mutex before starting the thread. This ensures they
* won't signal the cond var before we're waiting.
*/
+ state->thread_start_lock_.AssertNotHeld(self);
MutexLock thread_start_locker(self, state->thread_start_lock_);
/*