zstd: Update to upstream version 1.3.0
This commit is contained in:
parent
aa798ebf8f
commit
2c1764d5a9
20 changed files with 2751 additions and 1199 deletions
12
thirdparty/zstd/common/pool.c
vendored
12
thirdparty/zstd/common/pool.c
vendored
|
|
@ -146,6 +146,13 @@ void POOL_free(POOL_ctx *ctx) {
|
|||
free(ctx);
|
||||
}
|
||||
|
||||
size_t POOL_sizeof(POOL_ctx *ctx) {
|
||||
if (ctx==NULL) return 0; /* supports sizeof NULL */
|
||||
return sizeof(*ctx)
|
||||
+ ctx->queueSize * sizeof(POOL_job)
|
||||
+ ctx->numThreads * sizeof(pthread_t);
|
||||
}
|
||||
|
||||
void POOL_add(void *ctxVoid, POOL_function function, void *opaque) {
|
||||
POOL_ctx *ctx = (POOL_ctx *)ctxVoid;
|
||||
if (!ctx) { return; }
|
||||
|
|
@ -191,4 +198,9 @@ void POOL_add(void *ctx, POOL_function function, void *opaque) {
|
|||
function(opaque);
|
||||
}
|
||||
|
||||
size_t POOL_sizeof(POOL_ctx *ctx) {
|
||||
if (ctx==NULL) return 0; /* supports sizeof NULL */
|
||||
return sizeof(*ctx);
|
||||
}
|
||||
|
||||
#endif /* ZSTD_MULTITHREAD */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue