a0dbfe2fb0
Submitted by: Matthias Wolf, cem, rene Obtained from: Some patches from OpenBSD port (robert@openbsd.org)
20 lines
627 B
C
20 lines
627 B
C
--- base/synchronization/lock_impl.h.orig 2020-11-13 06:36:34 UTC
|
|
+++ base/synchronization/lock_impl.h
|
|
@@ -105,6 +105,8 @@ void LockImpl::Unlock() {
|
|
}
|
|
|
|
#elif defined(OS_POSIX) || defined(OS_FUCHSIA)
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wthread-safety-analysis"
|
|
|
|
bool LockImpl::Try() {
|
|
int rv = pthread_mutex_trylock(&native_handle_);
|
|
@@ -116,6 +118,7 @@ void LockImpl::Unlock() {
|
|
int rv = pthread_mutex_unlock(&native_handle_);
|
|
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
|
}
|
|
+#pragma GCC diagnostic pop
|
|
#endif
|
|
|
|
// This is an implementation used for AutoLock templated on the lock type.
|