summaryrefslogtreecommitdiff
path: root/patchoat/patchoat.h
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 /patchoat/patchoat.h
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 'patchoat/patchoat.h')
-rw-r--r--patchoat/patchoat.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/patchoat/patchoat.h b/patchoat/patchoat.h
index 23abca8c7e..6da516cbd9 100644
--- a/patchoat/patchoat.h
+++ b/patchoat/patchoat.h
@@ -94,16 +94,16 @@ class PatchOat {
bool new_oat_out); // Output oat was newly created?
static void BitmapCallback(mirror::Object* obj, void* arg)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ SHARED_REQUIRES(Locks::mutator_lock_) {
reinterpret_cast<PatchOat*>(arg)->VisitObject(obj);
}
void VisitObject(mirror::Object* obj)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ SHARED_REQUIRES(Locks::mutator_lock_);
void FixupMethod(ArtMethod* object, ArtMethod* copy)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ SHARED_REQUIRES(Locks::mutator_lock_);
void FixupNativePointerArray(mirror::PointerArray* object)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ SHARED_REQUIRES(Locks::mutator_lock_);
bool InHeap(mirror::Object*);
// Patches oat in place, modifying the oat_file given to the constructor.
@@ -113,13 +113,13 @@ class PatchOat {
template <typename ElfFileImpl>
bool PatchOatHeader(ElfFileImpl* oat_file);
- bool PatchImage() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- void PatchArtFields(const ImageHeader* image_header) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- void PatchArtMethods(const ImageHeader* image_header) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool PatchImage() SHARED_REQUIRES(Locks::mutator_lock_);
+ void PatchArtFields(const ImageHeader* image_header) SHARED_REQUIRES(Locks::mutator_lock_);
+ void PatchArtMethods(const ImageHeader* image_header) SHARED_REQUIRES(Locks::mutator_lock_);
void PatchInternedStrings(const ImageHeader* image_header)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ SHARED_REQUIRES(Locks::mutator_lock_);
void PatchDexFileArrays(mirror::ObjectArray<mirror::Object>* img_roots)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ SHARED_REQUIRES(Locks::mutator_lock_);
bool WriteElf(File* out);
bool WriteImage(File* out);
@@ -177,10 +177,10 @@ class PatchOat {
PatchVisitor(PatchOat* patcher, mirror::Object* copy) : patcher_(patcher), copy_(copy) {}
~PatchVisitor() {}
void operator() (mirror::Object* obj, MemberOffset off, bool b) const
- EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
+ REQUIRES(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
// For reference classes.
void operator() (mirror::Class* cls, mirror::Reference* ref) const
- EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
+ REQUIRES(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
private:
PatchOat* const patcher_;
mirror::Object* const copy_;