summaryrefslogtreecommitdiff
path: root/src/include/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/mutex.h')
-rw-r--r--src/include/mutex.h28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/include/mutex.h b/src/include/mutex.h
index 06b8c4a3304..910eb7af5b9 100644
--- a/src/include/mutex.h
+++ b/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