Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 13:55:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 14:02:04 +0300
commitcaa2306d16e879659cdbef4ec54752637fb5c474 (patch)
tree1255c9cdbdc9d18f67b40cb755ca58897e5cefd2 /extern/libmv/third_party/gflags/mutex.h
parent784517dfb9650f284d5f7e283b47233c00183686 (diff)
Libmv: Update to latest upstream version
Main purpose of this is to bring new gflags library which is more likely to have a fix for undefined order of static variables initialization and also to bring new glog where some compilation error are fixed (which are only visible with more strict checks with clang and c++11 enabled).
Diffstat (limited to 'extern/libmv/third_party/gflags/mutex.h')
-rw-r--r--extern/libmv/third_party/gflags/mutex.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/extern/libmv/third_party/gflags/mutex.h b/extern/libmv/third_party/gflags/mutex.h
index 7c3c060a043..0bdd9d5f2a5 100644
--- a/extern/libmv/third_party/gflags/mutex.h
+++ b/extern/libmv/third_party/gflags/mutex.h
@@ -32,11 +32,6 @@
// A simple mutex wrapper, supporting locks and read-write locks.
// You should assume the locks are *not* re-entrant.
//
-// To use: you should define the following macros in your configure.ac:
-// ACX_PTHREAD
-// AC_RWLOCK
-// The latter is defined in ../autoconf.
-//
// This class is meant to be internal-only and should be wrapped by an
// internal namespace. Before you use this module, please give the
// name of your internal namespace for this module. Or, if you want
@@ -108,14 +103,14 @@
// weird to a Mutex's memory after it is destroyed, but for a
// static global variable, that's pretty safe.
-#ifndef GOOGLE_MUTEX_H_
-#define GOOGLE_MUTEX_H_
+#ifndef GFLAGS_MUTEX_H_
+#define GFLAGS_MUTEX_H_
-#include "config.h" // to figure out pthreads support
+#include "gflags_declare.h" // to figure out pthreads support
#if defined(NO_THREADS)
- typedef int MutexType; // to keep a lock-count
-#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__)
+ typedef int MutexType; // to keep a lock-count
+#elif defined(OS_WINDOWS)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN // We only need minimal includes
# endif
@@ -232,7 +227,7 @@ bool Mutex::TryLock() { if (mutex_) return false; Lock(); return true; }
void Mutex::ReaderLock() { assert(++mutex_ > 0); }
void Mutex::ReaderUnlock() { assert(mutex_-- > 0); }
-#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__)
+#elif defined(OS_WINDOWS)
Mutex::Mutex() : destroy_(true) {
InitializeCriticalSection(&mutex_);
@@ -353,4 +348,4 @@ using namespace MUTEX_NAMESPACE;
#undef MUTEX_NAMESPACE
-#endif /* #define GOOGLE_MUTEX_H__ */
+#endif /* #define GFLAGS_MUTEX_H__ */