diff options
author | Yann Collet <cyan@fb.com> | 2017-09-28 18:14:28 -0700 |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2017-09-28 18:14:28 -0700 |
commit | 86b4fe5b45458c65f26762fb1de2803056e3d37e (patch) | |
tree | 81dbebaa72e05e66fbd75d38498bbd0d16d99577 /lib/common/pool.c | |
parent | e4ec42772066fb0c30b2d43ab6e75108815bb86a (diff) | |
download | zstd-86b4fe5b45458c65f26762fb1de2803056e3d37e.tar.gz |
adjustCParams : restored previous behavior
unknowns srcSize presumed small if there is a dictionary (dictSize>0)
and presumed large otherwise.
Diffstat (limited to 'lib/common/pool.c')
-rw-r--r-- | lib/common/pool.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/common/pool.c b/lib/common/pool.c index 9e6f802e..1b0fe103 100644 --- a/lib/common/pool.c +++ b/lib/common/pool.c @@ -99,16 +99,16 @@ static void* POOL_thread(void* opaque) { /* Unreachable */ } -POOL_ctx *POOL_create(size_t numThreads, size_t queueSize) { +POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) { return POOL_create_advanced(numThreads, queueSize, ZSTD_defaultCMem); } -POOL_ctx *POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) { - POOL_ctx *ctx; +POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) { + POOL_ctx* ctx; /* Check the parameters */ if (!numThreads) { return NULL; } /* Allocate the context and zero initialize */ - ctx = (POOL_ctx *)ZSTD_calloc(sizeof(POOL_ctx), customMem); + ctx = (POOL_ctx*)ZSTD_calloc(sizeof(POOL_ctx), customMem); if (!ctx) { return NULL; } /* Initialize the job queue. * It needs one extra space since one space is wasted to differentiate empty @@ -146,7 +146,7 @@ POOL_ctx *POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customM /*! POOL_join() : Shutdown the queue, wake any sleeping threads, and join all of the threads. */ -static void POOL_join(POOL_ctx *ctx) { +static void POOL_join(POOL_ctx* ctx) { /* Shut down the queue */ ZSTD_pthread_mutex_lock(&ctx->queueMutex); ctx->shutdown = 1; |