Commit 34a4e18f authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5507 fix usage of toku mutexes in the loader


git-svn-id: file:///svn/toku/tokudb@48033 c7de825b-a66e-492c-adef-691d508d4ae1
parent e6492da1
...@@ -168,7 +168,7 @@ int create_dbufio_fileset (DBUFIO_FILESET *bfsp, int N, int fds[/*N*/], size_t b ...@@ -168,7 +168,7 @@ int create_dbufio_fileset (DBUFIO_FILESET *bfsp, int N, int fds[/*N*/], size_t b
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) {
MALLOC_N(N, bfs->files); CALLOC_N(N, bfs->files);
if (bfs->files==NULL) { result = get_error_errno(); } if (bfs->files==NULL) { result = get_error_errno(); }
else { else {
for (int i=0; i<N; i++) { for (int i=0; i<N; i++) {
......
...@@ -1459,7 +1459,7 @@ static int extend_fileset (FTLOADER bl, struct merge_fileset *fs, FIDX*ffile) ...@@ -1459,7 +1459,7 @@ static int extend_fileset (FTLOADER bl, struct merge_fileset *fs, FIDX*ffile)
// RFP maybe this should be buried in the ft_loader struct // RFP maybe this should be buried in the ft_loader struct
// This was previously a cilk lock, but now we need it to work for pthreads too. // This was previously a cilk lock, but now we need it to work for pthreads too.
static toku_mutex_t update_progress_lock = { PTHREAD_MUTEX_INITIALIZER }; static toku_mutex_t update_progress_lock = TOKU_MUTEX_INITIALIZER;
static int update_progress (int N, static int update_progress (int N,
FTLOADER bl, FTLOADER bl,
......
...@@ -45,7 +45,7 @@ struct queue { ...@@ -45,7 +45,7 @@ struct queue {
int queue_create (QUEUE *q, uint64_t weight_limit) int queue_create (QUEUE *q, uint64_t weight_limit)
{ {
QUEUE MALLOC(result); QUEUE CALLOC(result);
if (result==NULL) return get_error_errno(); if (result==NULL) return get_error_errno();
result->contents_weight = 0; result->contents_weight = 0;
result->weight_limit = weight_limit; result->weight_limit = weight_limit;
......
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