diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-12-13 14:29:45 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-12-13 14:29:45 -0500 |
commit | 38ca37ce8cff40248f4a4965a87a84f73cdec35a (patch) | |
tree | c04b64771b1b8473a13b993cc63182f85fadc84a /src/include/connection.h | |
parent | c91d5cd8744f0e10cc10763a41a9d06c338b35d0 (diff) | |
download | mongo-38ca37ce8cff40248f4a4965a87a84f73cdec35a.tar.gz |
We need to handle static "location ID" variables with both multiple
connections and connections being opened and closed. Serialize the
"allocation" of location ID's and check in appropriate places if the
per-connection information they reference has been initialized for
any particular connection.
Diffstat (limited to 'src/include/connection.h')
-rw-r--r-- | src/include/connection.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/connection.h b/src/include/connection.h index f427b52228f..d8e7bea09ee 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -180,17 +180,18 @@ struct __wt_connection_impl { WT_CONNECTION_STATS stats; /* Connection statistics */ #if SPINLOCK_TYPE == SPINLOCK_PTHREAD_MUTEX_LOGGING -#define WT_SPINLOCK_MAX 50 - WT_SPINLOCK **spinlock_list; /* Spinlock registry */ - +#define WT_SPINLOCK_MAX 50 /* Spinlock registry */ + WT_SPINLOCK *spinlock_list[WT_SPINLOCK_MAX]; + /* Spinlock blocking matrix */ struct __wt_connection_stats_spinlock { const char *name; /* Mutex name */ - const char *file; /* Caller's file/line */ + + const char *file; /* Caller's file/line, ID location */ int line; u_int total; /* Count of total, blocked calls */ u_int blocked[WT_SPINLOCK_MAX]; - } *spinlock_block; /* Spinlock blocking matrix */ + } spinlock_block[WT_SPINLOCK_MAX]; #endif WT_SESSION_IMPL *stat_session; /* Statistics log session */ |