summaryrefslogtreecommitdiff
path: root/runtime/java_vm_ext.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-07-16 20:32:27 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-07-22 15:13:56 -0700
commit90443477f9a0061581c420775ce3b7eeae7468bc (patch)
tree8c74b81dfae162e0fd0ccf8d5ac50827ba815174 /runtime/java_vm_ext.cc
parent6078aec213dfaf111c29969706e8e5967cfc9bea (diff)
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
Diffstat (limited to 'runtime/java_vm_ext.cc')
-rw-r--r--runtime/java_vm_ext.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/java_vm_ext.cc b/runtime/java_vm_ext.cc
index 36e3aa3b58..9d41018c1b 100644
--- a/runtime/java_vm_ext.cc
+++ b/runtime/java_vm_ext.cc
@@ -87,7 +87,7 @@ class SharedLibrary {
* If the call has not yet finished in another thread, wait for it.
*/
bool CheckOnLoadResult()
- LOCKS_EXCLUDED(jni_on_load_lock_) {
+ REQUIRES(!jni_on_load_lock_) {
Thread* self = Thread::Current();
bool okay;
{
@@ -112,7 +112,7 @@ class SharedLibrary {
return okay;
}
- void SetResult(bool result) LOCKS_EXCLUDED(jni_on_load_lock_) {
+ void SetResult(bool result) REQUIRES(!jni_on_load_lock_) {
Thread* self = Thread::Current();
MutexLock mu(self, jni_on_load_lock_);
@@ -210,8 +210,8 @@ class Libraries {
// See section 11.3 "Linking Native Methods" of the JNI spec.
void* FindNativeMethod(ArtMethod* m, std::string& detail)
- EXCLUSIVE_LOCKS_REQUIRED(Locks::jni_libraries_lock_)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ REQUIRES(Locks::jni_libraries_lock_)
+ SHARED_REQUIRES(Locks::mutator_lock_) {
std::string jni_short_name(JniShortName(m));
std::string jni_long_name(JniLongName(m));
const mirror::ClassLoader* declaring_class_loader = m->GetDeclaringClass()->GetClassLoader();