diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-06-27 12:01:10 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-06-27 12:01:10 +1000 |
commit | 95d911ab246e444192f34dc395652dba2653dd3c (patch) | |
tree | 8e7c4692125a841a486607ccfe26e8499bc4c398 /test/checkpoint/checkpointer.c | |
parent | 19cd4d9be2c0fd980c00bb04bc949970002f5cb2 (diff) | |
parent | d139a5d5be1d7ba94130502b379a61a809e66272 (diff) | |
download | mongo-2.9.3.tar.gz |
Merge branch 'mongodb-3.6'2.9.3
Diffstat (limited to 'test/checkpoint/checkpointer.c')
-rw-r--r-- | test/checkpoint/checkpointer.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/test/checkpoint/checkpointer.c b/test/checkpoint/checkpointer.c index 84d2765843a..3135caa8cad 100644 --- a/test/checkpoint/checkpointer.c +++ b/test/checkpoint/checkpointer.c @@ -1,5 +1,5 @@ /*- - * Public Domain 2014-2016 MongoDB, Inc. + * Public Domain 2014-2017 MongoDB, Inc. * Public Domain 2008-2014 WiredTiger, Inc. * * This is free and unencumbered software released into the public domain. @@ -28,7 +28,7 @@ #include "test_checkpoint.h" -static void *checkpointer(void *); +static WT_THREAD_RET checkpointer(void *); static int compare_cursors( WT_CURSOR *, const char *, WT_CURSOR *, const char *); static int diagnose_key_error(WT_CURSOR *, int, WT_CURSOR *, int); @@ -39,35 +39,28 @@ static int verify_checkpoint(WT_SESSION *); * start_checkpoints -- * Responsible for creating the checkpoint thread. */ -int +void start_checkpoints(void) { - int ret; - - if ((ret = pthread_create( - &g.checkpoint_thread, NULL, checkpointer, NULL)) != 0) - return (log_print_err("pthread_create", ret, 1)); - return (0); + testutil_check(__wt_thread_create(NULL, + &g.checkpoint_thread, checkpointer, NULL)); } /* * end_checkpoints -- * Responsible for cleanly shutting down the checkpoint thread. */ -int +void end_checkpoints(void) { - void *thread_ret; - - return (pthread_join(g.checkpoint_thread, &thread_ret)); - + testutil_check(__wt_thread_join(NULL, g.checkpoint_thread)); } /* * checkpointer -- * Checkpoint thread start function. */ -static void * +static WT_THREAD_RET checkpointer(void *arg) { char tid[128]; @@ -78,7 +71,7 @@ checkpointer(void *arg) printf("checkpointer thread starting: tid: %s\n", tid); (void)real_checkpointer(); - return (NULL); + return (WT_THREAD_RET_VALUE); } /* |