diff options
Diffstat (limited to 'src/include/mutex.h')
| -rw-r--r-- | src/include/mutex.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/include/mutex.h b/src/include/mutex.h index 84f015d6b67..6b81b1a6265 100644 --- a/src/include/mutex.h +++ b/src/include/mutex.h @@ -53,9 +53,11 @@ typedef union { /* Read/write lock */ * WiredTiger uses read/write locks for shared/exclusive access to resources. */ struct __wt_rwlock { + WT_CACHE_LINE_PAD_BEGIN const char *name; /* Lock name for debugging */ wt_rwlock_t rwlock; /* Read/write lock */ + WT_CACHE_LINE_PAD_END }; /* @@ -72,7 +74,8 @@ struct __wt_rwlock { #if SPINLOCK_TYPE == SPINLOCK_GCC -struct WT_COMPILER_TYPE_ALIGN(WT_CACHE_LINE_ALIGNMENT) __wt_spinlock { +struct __wt_spinlock { + WT_CACHE_LINE_PAD_BEGIN volatile int lock; /* @@ -84,13 +87,15 @@ struct WT_COMPILER_TYPE_ALIGN(WT_CACHE_LINE_ALIGNMENT) __wt_spinlock { 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_COMPILER_TYPE_ALIGN(WT_CACHE_LINE_ALIGNMENT) __wt_spinlock { +struct __wt_spinlock { + WT_CACHE_LINE_PAD_BEGIN wt_mutex_t lock; const char *name; /* Mutex name */ @@ -106,6 +111,7 @@ struct WT_COMPILER_TYPE_ALIGN(WT_CACHE_LINE_ALIGNMENT) __wt_spinlock { int16_t stat_int_usecs_off; /* waiting server threads offset */ int8_t initialized; /* Lock initialized, for cleanup */ + WT_CACHE_LINE_PAD_END }; #else |
