From 90443477f9a0061581c420775ce3b7eeae7468bc Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 16 Jul 2015 20:32:27 -0700 Subject: 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 --- runtime/java_vm_ext.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/java_vm_ext.cc') 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(); -- cgit v1.2.3-59-g8ed1b