summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-09-22 19:47:47 -0400
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-09-23 09:47:47 +1000
commitd40e5da96b02a344d71c88220ad969816bf99404 (patch)
tree5c49812a15ff1569993950e563914477fcb41a4d
parent8ef98127b1fbf1d8a0fc8c2e97ad9b06b7d3517a (diff)
downloadmongo-d40e5da96b02a344d71c88220ad969816bf99404.tar.gz
WT-2925 WT_THREAD_PANIC_FAIL is a WT_THREAD structure flag (#3055)
WT_THREAD_PANIC_FAIL is a WT_THREAD structure flag, but is declared elsewhere, likely to introduce a bug if additional flags are added to the WT_THREAD structure.
-rw-r--r--src/include/thread_group.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/include/thread_group.h b/src/include/thread_group.h
index f946dcab144..76758a090c4 100644
--- a/src/include/thread_group.h
+++ b/src/include/thread_group.h
@@ -14,7 +14,14 @@ struct __wt_thread {
WT_SESSION_IMPL *session;
u_int id;
wt_thread_t tid;
-#define WT_THREAD_RUN 0x01
+
+ /*
+ * WT_THREAD and thread-group function flags, merged because
+ * WT_THREAD_PANIC_FAIL appears in both groups.
+ */
+#define WT_THREAD_CAN_WAIT 0x01 /* WT_SESSION_CAN_WAIT */
+#define WT_THREAD_PANIC_FAIL 0x02 /* panic if the thread fails */
+#define WT_THREAD_RUN 0x04 /* thread is running */
uint32_t flags;
/* The runner function used by all threads. */
@@ -22,12 +29,6 @@ struct __wt_thread {
};
/*
- * Flags for thread group functions.
- */
-#define WT_THREAD_CAN_WAIT 0x01
-#define WT_THREAD_PANIC_FAIL 0x02
-
-/*
* WT_THREAD_GROUP --
* Encapsulation of a group of utility threads.
*/