diff --git a/contrib/adaptive-compression/v2 b/contrib/adaptive-compression/v2 deleted file mode 100755 index 38034cdab..000000000 Binary files a/contrib/adaptive-compression/v2 and /dev/null differ diff --git a/contrib/adaptive-compression/v2.c b/contrib/adaptive-compression/v2.c index eaaecb76c..edb2d0f3f 100644 --- a/contrib/adaptive-compression/v2.c +++ b/contrib/adaptive-compression/v2.c @@ -64,6 +64,15 @@ static adaptCCtx* createCCtx(unsigned numJobs, const char* const outFilename) pthread_cond_init(&ctx->allJobsCompleted_cond, NULL); ctx->numJobs = numJobs; ctx->jobs = calloc(1, numJobs*sizeof(jobDescription)); + { + unsigned u; + for (u=0; ujobs[u].jobCompleted_mutex = &ctx->jobCompleted_mutex; + ctx->jobs[u].jobCompleted_cond = &ctx->jobCompleted_cond; + ctx->jobs[u].jobReady_mutex = &ctx->jobReady_mutex; + ctx->jobs[u].jobReady_cond = &ctx->jobReady_cond; + } + } ctx->nextJobID = 0; ctx->threadError = 0; ctx->allJobsCompleted = 0; @@ -314,7 +323,7 @@ int main(int argCount, const char* argv[]) } if (feof(srcFile)) break; } - + cleanup: /* file compression completed */ ret |= (srcFile != NULL) ? fclose(srcFile) : 0;