summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/async/async_worker.c
diff options
context:
space:
mode:
authorRamon Fernandez <ramon.fernandez@mongodb.com>2015-03-26 12:27:35 -0400
committerRamon Fernandez <ramon.fernandez@mongodb.com>2015-03-26 12:27:35 -0400
commit61d6d65a8b6c18f38465e2379b9897cab8f3f5e8 (patch)
tree89911163de7a4e1a1fcfe9deaa966d6d93840b5f /src/third_party/wiredtiger/src/async/async_worker.c
parent06b58e9c7c349ce81504cf6ce2823082205ab0f7 (diff)
downloadmongo-61d6d65a8b6c18f38465e2379b9897cab8f3f5e8.tar.gz
Import wiredtiger-wiredtiger-2.5.2-293-g3e37e1f.tar.gz from wiredtiger branch mongodb-3.0
Diffstat (limited to 'src/third_party/wiredtiger/src/async/async_worker.c')
-rw-r--r--src/third_party/wiredtiger/src/async/async_worker.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/src/async/async_worker.c b/src/third_party/wiredtiger/src/async/async_worker.c
index c68d0e8a838..543046f7a0c 100644
--- a/src/third_party/wiredtiger/src/async/async_worker.c
+++ b/src/third_party/wiredtiger/src/async/async_worker.c
@@ -18,8 +18,8 @@ __async_op_dequeue(WT_CONNECTION_IMPL *conn, WT_SESSION_IMPL *session,
WT_ASYNC_OP_IMPL **op)
{
WT_ASYNC *async;
- long sleep_usec;
uint64_t cur_tail, last_consume, my_consume, my_slot, prev_slot;
+ uint64_t sleep_usec;
uint32_t tries;
async = conn->async;
@@ -75,7 +75,8 @@ retry:
*/
my_slot = my_consume % async->async_qsize;
prev_slot = last_consume % async->async_qsize;
- *op = WT_ATOMIC_STORE8(async->async_queue[my_slot], NULL);
+ *op = (WT_ASYNC_OP_IMPL*)WT_ATOMIC_STORE8(
+ async->async_queue[my_slot], NULL);
WT_ASSERT(session, async->cur_queue > 0);
WT_ASSERT(session, *op != NULL);
@@ -278,10 +279,10 @@ __async_worker_op(WT_SESSION_IMPL *session, WT_ASYNC_OP_IMPL *op,
}
/*
- * __async_worker --
+ * __wt_async_worker --
* The async worker threads.
*/
-void *
+WT_THREAD_RET
__wt_async_worker(void *arg)
{
WT_ASYNC *async;
@@ -354,5 +355,5 @@ err: WT_PANIC_MSG(session, ret, "async worker error");
__wt_free(session, ac);
ac = acnext;
}
- return (NULL);
+ return (WT_THREAD_RET_VALUE);
}