summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrii Ishcheikin <ishcheikin@google.com>2024-01-17 14:47:56 +0000
committerDmitrii Ishcheikin <ishcheikin@google.com>2024-01-17 17:39:49 +0000
commit17014030ae839ad7c6882c680db3c08eea994885 (patch)
treebab7f1ce4c975f6300716043a40cfe8aabd39913
parentf488d405d47c6ddaccd91790cb3305d5d697d5e5 (diff)
downloadart-17014030ae839ad7c6882c680db3c08eea994885.tar.gz
Add visibility attributes in runtime/b*
Bug: 260881207 Test: presubmit Test: abtd app_compat_drm Test: abtd app_compat_top_100 Test: abtd app_compat_banking Change-Id: I7cdd5c1b67996e2cf365ae1f959c704d3486ba97
-rw-r--r--runtime/backtrace_helper.cc2
-rw-r--r--runtime/backtrace_helper.h4
-rw-r--r--runtime/barrier.cc2
-rw-r--r--runtime/barrier.h13
-rw-r--r--runtime/barrier_test.cc2
5 files changed, 13 insertions, 10 deletions
diff --git a/runtime/backtrace_helper.cc b/runtime/backtrace_helper.cc
index 260843d7dc..16beb8ee9e 100644
--- a/runtime/backtrace_helper.cc
+++ b/runtime/backtrace_helper.cc
@@ -38,7 +38,7 @@
#endif
-namespace art {
+namespace art HIDDEN {
// We only really support libunwindstack on linux which is unfortunate but since this is only for
// gcstress this isn't a huge deal.
diff --git a/runtime/backtrace_helper.h b/runtime/backtrace_helper.h
index 9be2550b92..9be08ca195 100644
--- a/runtime/backtrace_helper.h
+++ b/runtime/backtrace_helper.h
@@ -20,11 +20,13 @@
#include <stddef.h>
#include <stdint.h>
+#include "base/macros.h"
+
namespace unwindstack {
class Unwinder;
}
-namespace art {
+namespace art HIDDEN {
// Using libunwindstack
class BacktraceCollector {
diff --git a/runtime/barrier.cc b/runtime/barrier.cc
index a6cc9ba053..6a9bdfcd8f 100644
--- a/runtime/barrier.cc
+++ b/runtime/barrier.cc
@@ -23,7 +23,7 @@
#include "base/time_utils.h"
#include "thread.h"
-namespace art {
+namespace art HIDDEN {
Barrier::Barrier(int count, bool verify_count_on_shutdown)
: count_(count),
diff --git a/runtime/barrier.h b/runtime/barrier.h
index 4c94a144bd..d2ff5b239d 100644
--- a/runtime/barrier.h
+++ b/runtime/barrier.h
@@ -30,8 +30,9 @@
#include <memory>
#include "base/locks.h"
+#include "base/macros.h"
-namespace art {
+namespace art HIDDEN {
class ConditionVariable;
class LOCKABLE Mutex;
@@ -39,18 +40,18 @@ class LOCKABLE Mutex;
// TODO: Maybe give this a better name.
class Barrier {
public:
- enum LockHandling {
+ enum EXPORT LockHandling {
kAllowHoldingLocks,
kDisallowHoldingLocks,
};
// If verify_count_on_shutdown is true, the destructor verifies that the count is zero in the
// destructor. This means that all expected threads went through the barrier.
- explicit Barrier(int count, bool verify_count_on_shutdown = true);
- virtual ~Barrier();
+ EXPORT explicit Barrier(int count, bool verify_count_on_shutdown = true);
+ EXPORT virtual ~Barrier();
// Pass through the barrier, decrement the count but do not block.
- void Pass(Thread* self) REQUIRES(!GetLock());
+ EXPORT void Pass(Thread* self) REQUIRES(!GetLock());
// Increment the barrier but do not block. The caller should ensure that it
// decrements/passes it eventually.
void IncrementNoWait(Thread* self) REQUIRES(!GetLock());
@@ -67,7 +68,7 @@ class Barrier {
// Increment the count by delta, wait on condition while count is non zero. If LockHandling is
// kAllowHoldingLocks we will not check that all locks are released when waiting.
template <Barrier::LockHandling locks = kDisallowHoldingLocks>
- void Increment(Thread* self, int delta) REQUIRES(!GetLock());
+ EXPORT void Increment(Thread* self, int delta) REQUIRES(!GetLock());
// Increment the count by delta, wait on condition while count is non zero, with a timeout.
// Returns true if time out occurred.
diff --git a/runtime/barrier_test.cc b/runtime/barrier_test.cc
index e53241cb76..fbb263990c 100644
--- a/runtime/barrier_test.cc
+++ b/runtime/barrier_test.cc
@@ -24,7 +24,7 @@
#include "thread-current-inl.h"
#include "thread_pool.h"
-namespace art {
+namespace art HIDDEN {
class CheckWaitTask : public Task {
public:
CheckWaitTask(Barrier* barrier, AtomicInteger* count1, AtomicInteger* count2)