MCPcopy Create free account
hub / github.com/F-Stack/f-stack / POOL_resize

Function POOL_resize

freebsd/contrib/zstd/lib/common/pool.c:233–242  ·  view source on GitHub ↗

@return : 0 on success, 1 on error */

Source from the content-addressed store, hash-verified

231
232/* @return : 0 on success, 1 on error */
233int POOL_resize(POOL_ctx* ctx, size_t numThreads)
234{
235 int result;
236 if (ctx==NULL) return 1;
237 ZSTD_pthread_mutex_lock(&ctx->queueMutex);
238 result = POOL_resize_internal(ctx, numThreads);
239 ZSTD_pthread_cond_broadcast(&ctx->queuePopCond);
240 ZSTD_pthread_mutex_unlock(&ctx->queueMutex);
241 return result;
242}
243
244/**
245 * Returns 1 if the queue is full and 0 otherwise.

Callers 1

ZSTDMT_resizeFunction · 0.50

Calls 1

POOL_resize_internalFunction · 0.70

Tested by

no test coverage detected