Commit 950d5167 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 dbdc3ef1
......@@ -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(); }
bool mutex_inited = false, cond_inited = false;
if (result==0) {
MALLOC_N(N, bfs->files);
CALLOC_N(N, bfs->files);
if (bfs->files==NULL) { result = get_error_errno(); }
else {
for (int i=0; i<N; i++) {
......
......@@ -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
// 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,
FTLOADER bl,
......
......@@ -45,7 +45,7 @@ struct queue {
int queue_create (QUEUE *q, uint64_t weight_limit)
{
QUEUE MALLOC(result);
QUEUE CALLOC(result);
if (result==NULL) return get_error_errno();
result->contents_weight = 0;
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