aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/mutex.h')
-rw-r--r--src/google/protobuf/stubs/mutex.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/google/protobuf/stubs/mutex.h b/src/google/protobuf/stubs/mutex.h
index 2b1aab87..8c997363 100644
--- a/src/google/protobuf/stubs/mutex.h
+++ b/src/google/protobuf/stubs/mutex.h
@@ -46,6 +46,8 @@
#define GOOGLE_PROTOBUF_RELEASE(...)
#endif
+#include <google/protobuf/port_def.inc>
+
// ===================================================================
// emulates google3/base/mutex.h
namespace google {
@@ -57,7 +59,7 @@ namespace internal {
// Mutex is a natural type to wrap. As both google and other organization have
// specialized mutexes. gRPC also provides an injection mechanism for custom
// mutexes.
-class LIBPROTOBUF_EXPORT WrappedMutex {
+class PROTOBUF_EXPORT WrappedMutex {
public:
WrappedMutex() = default;
void Lock() GOOGLE_PROTOBUF_ACQUIRE() { mu_.lock(); }
@@ -73,7 +75,7 @@ class LIBPROTOBUF_EXPORT WrappedMutex {
using Mutex = WrappedMutex;
// MutexLock(mu) acquires mu when constructed and releases it when destroyed.
-class LIBPROTOBUF_EXPORT MutexLock {
+class PROTOBUF_EXPORT MutexLock {
public:
explicit MutexLock(Mutex *mu) : mu_(mu) { this->mu_->Lock(); }
~MutexLock() { this->mu_->Unlock(); }
@@ -87,7 +89,7 @@ typedef MutexLock ReaderMutexLock;
typedef MutexLock WriterMutexLock;
// MutexLockMaybe is like MutexLock, but is a no-op when mu is nullptr.
-class LIBPROTOBUF_EXPORT MutexLockMaybe {
+class PROTOBUF_EXPORT MutexLockMaybe {
public:
explicit MutexLockMaybe(Mutex *mu) :
mu_(mu) { if (this->mu_ != nullptr) { this->mu_->Lock(); } }
@@ -141,4 +143,6 @@ using internal::MutexLockMaybe;
#undef GOOGLE_PROTOBUF_ACQUIRE
#undef GOOGLE_PROTOBUF_RELEASE
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_STUBS_MUTEX_H_