Commit 72c30eb2 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5507 mutex initializers


git-svn-id: file:///svn/toku/tokudb@48056 c7de825b-a66e-492c-adef-691d508d4ae1
parent 69229ee5
...@@ -164,7 +164,7 @@ static void* io_thread (void *v) ...@@ -164,7 +164,7 @@ static void* io_thread (void *v)
int create_dbufio_fileset (DBUFIO_FILESET *bfsp, int N, int fds[/*N*/], size_t bufsize) { int create_dbufio_fileset (DBUFIO_FILESET *bfsp, int N, int fds[/*N*/], size_t bufsize) {
//printf("%s:%d here\n", __FILE__, __LINE__); //printf("%s:%d here\n", __FILE__, __LINE__);
int result = 0; int result = 0;
DBUFIO_FILESET MALLOC(bfs); DBUFIO_FILESET CALLOC(bfs);
if (bfs==0) { result = get_error_errno(); } if (bfs==0) { result = get_error_errno(); }
bool mutex_inited = false, cond_inited = false; bool mutex_inited = false, cond_inited = false;
if (result==0) { if (result==0) {
......
...@@ -730,6 +730,7 @@ serialize_and_compress_in_parallel(FTNODE node, ...@@ -730,6 +730,7 @@ serialize_and_compress_in_parallel(FTNODE node,
if (T > 0) if (T > 0)
T = T - 1; T = T - 1;
struct workset ws; struct workset ws;
ZERO_STRUCT(ws);
workset_init(&ws); workset_init(&ws);
struct serialize_compress_work work[npartitions]; struct serialize_compress_work work[npartitions];
workset_lock(&ws); workset_lock(&ws);
......
...@@ -2221,6 +2221,7 @@ static int toku_loader_write_ft_from_q (FTLOADER bl, ...@@ -2221,6 +2221,7 @@ static int toku_loader_write_ft_from_q (FTLOADER bl,
toku_ft_init(&ft, (BLOCKNUM){0}, bl->load_lsn, root_xid_that_created, target_nodesize, target_basementnodesize, target_compression_method); toku_ft_init(&ft, (BLOCKNUM){0}, bl->load_lsn, root_xid_that_created, target_nodesize, target_basementnodesize, target_compression_method);
struct dbout out; struct dbout out;
ZERO_STRUCT(out);
dbout_init(&out, &ft); dbout_init(&out, &ft);
out.fd = fd; out.fd = fd;
out.current_off = 8192; // leave 8K reserved at beginning out.current_off = 8192; // leave 8K reserved at beginning
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#define FTLOADER_ERROR_INJECTOR_H #define FTLOADER_ERROR_INJECTOR_H
static toku_mutex_t event_mutex = { PTHREAD_MUTEX_INITIALIZER }; static toku_mutex_t event_mutex = TOKU_MUTEX_INITIALIZER;
static void lock_events(void) { static void lock_events(void) {
toku_mutex_lock(&event_mutex); toku_mutex_lock(&event_mutex);
} }
......
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