Commit b999f38a authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5507 more mutex initializers


git-svn-id: file:///svn/toku/tokudb@48059 c7de825b-a66e-492c-adef-691d508d4ae1
parent d481ec1f
......@@ -218,6 +218,7 @@ compress_all_sub_blocks(int n_sub_blocks, struct sub_block sub_block[], char *un
T = T - 1; // threads in addition to the running thread
struct workset ws;
ZERO_STRUCT(ws);
workset_init(&ws);
struct compress_work work[n_sub_blocks];
......@@ -317,6 +318,7 @@ decompress_all_sub_blocks(int n_sub_blocks, struct sub_block sub_block[], unsign
// init the decompression work set
struct workset ws;
ZERO_STRUCT(ws);
workset_init(&ws);
// initialize the decompression work and add to the work set
......
......@@ -105,6 +105,7 @@ test_main (int argc, const char *argv[]) {
struct my_threadpool my_threadpool;
THREADPOOL threadpool;
ZERO_STRUCT(my_threadpool);
my_threadpool_init(&my_threadpool, max_threads);
threadpool = my_threadpool.threadpool;
if (verbose) printf("test threadpool_set_busy\n");
......
......@@ -115,11 +115,10 @@ toku_thread_run_internal(void *arg) {
int
toku_thread_pool_create(struct toku_thread_pool **pool_return, int max_threads) {
int r;
struct toku_thread_pool *MALLOC(pool);
struct toku_thread_pool *CALLOC(pool);
if (pool == NULL) {
r = get_error_errno();
} else {
memset(pool, 0, sizeof *pool);
toku_mutex_init(&pool->lock, NULL);
toku_list_init(&pool->free_threads);
toku_list_init(&pool->all_threads);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment