summaryrefslogtreecommitdiff
path: root/runtime/mirror/object.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-03-06 12:13:39 -0800
committer Ian Rogers <irogers@google.com> 2014-03-06 19:16:01 -0800
commit719d1a33f6569864f529e5a3fff59e7bca97aad0 (patch)
treefcd84efd7b9806b93ec1a44e2317e6f882e7fe0e /runtime/mirror/object.h
parent5365eea9940269b662cfbe103caa348816ff1558 (diff)
Enable annotalysis on clang ART builds.
Fix clang build errors aswell as restructure locking/mutex code for correct thread safety analysis support. Reorder make dependencies so that host builds build first as they should provide better compilation errors than target. Remove host's use of -fno-omit-frame-pointer as it has no value with correct use of CFI, which we should have. Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
Diffstat (limited to 'runtime/mirror/object.h')
-rw-r--r--runtime/mirror/object.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index ded4e0ae7a..4e2c624516 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -21,6 +21,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "cutils/atomic-inline.h"
+#include "monitor.h"
#include "object_reference.h"
#include "offsets.h"
#include "runtime.h"
@@ -30,7 +31,6 @@ namespace art {
class ImageWriter;
class LockWord;
-class Monitor;
struct ObjectOffsets;
class Thread;
template <typename T> class SirtRef;
@@ -64,7 +64,7 @@ class Throwable;
static constexpr bool kCheckFieldAssignments = false;
// C++ mirror of java.lang.Object
-class MANAGED Object {
+class MANAGED LOCKABLE Object {
public:
static MemberOffset ClassOffset() {
return OFFSET_OF_OBJECT_MEMBER(Object, klass_);
@@ -104,9 +104,9 @@ class MANAGED Object {
uint32_t GetLockOwnerThreadId();
mirror::Object* MonitorEnter(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
- EXCLUSIVE_LOCK_FUNCTION(monitor_lock_);
+ EXCLUSIVE_LOCK_FUNCTION();
bool MonitorExit(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
- UNLOCK_FUNCTION(monitor_lock_);
+ UNLOCK_FUNCTION();
void Notify(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void NotifyAll(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void Wait(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);