summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2011-10-18 10:29:11 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2011-10-18 10:29:11 +1100
commite24981d156e74679fb3c1f58934dcb3328ba8690 (patch)
treec7925a944e92660575e6baffacdfe88470f19b76 /src/support
parent48cc8270876d695790447fb33753eaba6bde6d14 (diff)
downloadmongo-e24981d156e74679fb3c1f58934dcb3328ba8690.tar.gz
Remove the "multithread" configuration for connections.
Diffstat (limited to 'src/support')
-rw-r--r--src/support/serial.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/support/serial.c b/src/support/serial.c
index 4befa74b52d..9d61aec6edf 100644
--- a/src/support/serial.c
+++ b/src/support/serial.c
@@ -20,6 +20,10 @@ int
__wt_session_serialize_func(WT_SESSION_IMPL *session,
wq_state_t op, void (*func)(WT_SESSION_IMPL *), void *args)
{
+ WT_CONNECTION_IMPL *conn;
+
+ conn = S2C(session);
+
/*
* Threads serializing access to data using a function:
* set a function/argument pair in the WT_SESSION_IMPL handle,
@@ -35,12 +39,13 @@ __wt_session_serialize_func(WT_SESSION_IMPL *session,
session->wq_sleeping = op == WT_WORKQ_FUNC ? 0 : 1;
/*
- * If we're multithreaded, the workQ has to schedule all functions; if
- * not multithreaded, functions are called directly, only communication
- * with other threads goes through serialization.
+ * Functions are called directly (holding a spinlock), only
+ * communication with other threads goes through serialization.
*/
- if (!F_ISSET(S2C(session), WT_MULTITHREAD) && op == WT_WORKQ_FUNC) {
+ if (op == WT_WORKQ_FUNC) {
+ __wt_spin_lock(&conn->workq_lock);
func(session);
+ __wt_spin_unlock(&conn->workq_lock);
return (session->wq_ret);
}