summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/mutex.h
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2017-04-11 06:48:13 +1000
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-04-11 06:48:13 +1000
commitaee82ce9a64c6f44fae2f81598c8e153d19f8d02 (patch)
tree349a6f1c44ad99aa693bc6b920a65e7c2f948e20 /src/third_party/wiredtiger/src/include/mutex.h
parent9df49e4e8b6b60106bbaad9f97d4457395ffacd0 (diff)
downloadmongo-aee82ce9a64c6f44fae2f81598c8e153d19f8d02.tar.gz
Import wiredtiger: cb16839cfbdf338af95bed43ca40979ae6e32f54 from branch mongodb-3.6
ref: af735d14a6..cb16839cfb for: 3.5.6 WT-3249 Unit test test_readonly fails as it is unable to open WiredTiger.lock WT-3250 Incorrect statistics incremented on Windows WT-3254 test_reconfig02 uses incorrect configuration string WT-3262 Schema operations shouldn't wait for cache WT-3265 Verify hits assertion in eviction when transiting handle to exclusive mode WT-3271 Fix a bug where eviction tuning could get stuck in a loop
Diffstat (limited to 'src/third_party/wiredtiger/src/include/mutex.h')
-rw-r--r--src/third_party/wiredtiger/src/include/mutex.h28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/third_party/wiredtiger/src/include/mutex.h b/src/third_party/wiredtiger/src/include/mutex.h
index 06b8c4a3304..910eb7af5b9 100644
--- a/src/third_party/wiredtiger/src/include/mutex.h
+++ b/src/third_party/wiredtiger/src/include/mutex.h
@@ -62,31 +62,17 @@ union __wt_rwlock { /* Read/write lock */
#define SPINLOCK_PTHREAD_MUTEX 2
#define SPINLOCK_PTHREAD_MUTEX_ADAPTIVE 3
-#if SPINLOCK_TYPE == SPINLOCK_GCC
-
struct __wt_spinlock {
WT_CACHE_LINE_PAD_BEGIN
+#if SPINLOCK_TYPE == SPINLOCK_GCC
volatile int lock;
-
- /*
- * We track acquisitions and time spent waiting for some locks. For
- * performance reasons and to make it possible to write generic code
- * that tracks statistics for different locks, we store the offset
- * of the statistics fields to be updated during lock acquisition.
- */
- int16_t stat_count_off; /* acquisitions offset */
- int16_t stat_app_usecs_off; /* waiting application threads offset */
- int16_t stat_int_usecs_off; /* waiting server threads offset */
- WT_CACHE_LINE_PAD_END
-};
-
#elif SPINLOCK_TYPE == SPINLOCK_PTHREAD_MUTEX ||\
SPINLOCK_TYPE == SPINLOCK_PTHREAD_MUTEX_ADAPTIVE ||\
SPINLOCK_TYPE == SPINLOCK_MSVC
-
-struct __wt_spinlock {
- WT_CACHE_LINE_PAD_BEGIN
wt_mutex_t lock;
+#else
+#error Unknown spinlock type
+#endif
const char *name; /* Mutex name */
@@ -103,9 +89,3 @@ struct __wt_spinlock {
int8_t initialized; /* Lock initialized, for cleanup */
WT_CACHE_LINE_PAD_END
};
-
-#else
-
-#error Unknown spinlock type
-
-#endif