Skip to content

Commit

Permalink
yet more ABSL_DLL
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed May 9, 2023
1 parent a231972 commit 0c802bd
Showing 1 changed file with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
From c0ae6b39d8caa34c24a38f680873fcd31f382f7a Mon Sep 17 00:00:00 2001
From 32595ce2c79f18c291a25d23c63cf698617e56ac Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Mon, 8 May 2023 11:15:46 +1100
Subject: [PATCH 11/11] make CordzHandle and relevant internal state use
ABSL_DLL

---
absl/base/internal/spinlock.h | 2 +-
absl/strings/internal/cord_internal.cc | 2 +-
absl/strings/internal/cord_internal.h | 2 +-
absl/strings/internal/cordz_handle.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
absl/strings/internal/cordz_handle.h | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/absl/base/internal/spinlock.h b/absl/base/internal/spinlock.h
index 09ba5824..332fc795 100644
--- a/absl/base/internal/spinlock.h
+++ b/absl/base/internal/spinlock.h
@@ -45,7 +45,7 @@ namespace absl {
ABSL_NAMESPACE_BEGIN
namespace base_internal {

-class ABSL_LOCKABLE SpinLock {
+class ABSL_DLL ABSL_LOCKABLE SpinLock {
public:
SpinLock() : lockword_(kSpinLockCooperative) {
ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static);
diff --git a/absl/strings/internal/cord_internal.cc b/absl/strings/internal/cord_internal.cc
index b6b06cfa..f2842511 100644
--- a/absl/strings/internal/cord_internal.cc
Expand Down Expand Up @@ -37,7 +51,7 @@ index 63a81f4f..796d4de9 100644
inline void enable_cord_ring_buffer(bool enable) {
cord_ring_buffer_enabled.store(enable, std::memory_order_relaxed);
diff --git a/absl/strings/internal/cordz_handle.h b/absl/strings/internal/cordz_handle.h
index 3c800b43..bb23e626 100644
index 3c800b43..2e558764 100644
--- a/absl/strings/internal/cordz_handle.h
+++ b/absl/strings/internal/cordz_handle.h
@@ -34,7 +34,7 @@ namespace cord_internal {
Expand All @@ -49,7 +63,7 @@ index 3c800b43..bb23e626 100644
public:
CordzHandle() : CordzHandle(false) {}

@@ -81,7 +81,7 @@ class CordzHandle {
@@ -81,13 +81,13 @@ class CordzHandle {
private:
// Global queue data. CordzHandle stores a pointer to the global queue
// instance to harden against ODR violations.
Expand All @@ -58,3 +72,10 @@ index 3c800b43..bb23e626 100644
constexpr explicit Queue(absl::ConstInitType)
: mutex(absl::kConstInit,
absl::base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL) {}

absl::base_internal::SpinLock mutex;
- std::atomic<CordzHandle*> dq_tail ABSL_GUARDED_BY(mutex){nullptr};
+ ABSL_DLL std::atomic<CordzHandle*> dq_tail ABSL_GUARDED_BY(mutex){nullptr};

// Returns true if this delete queue is empty. This method does not acquire
// the lock, but does a 'load acquire' observation on the delete queue tail.

0 comments on commit 0c802bd

Please sign in to comment.