diff --git a/C/zstdmt/README.md b/C/zstdmt/README.md index 26308482..8c16f0d4 100644 --- a/C/zstdmt/README.md +++ b/C/zstdmt/README.md @@ -1,10 +1,8 @@ # Multithreading Library for [LZ4], [LZ5] and [ZStandard] -- this library is a temporary solution to the threading problem with zstd, lz4 and lz5 -- future versions of that compression libs will support threading in some way, I think ;) -- it's based on my zstdmt version @ github... +- this library is used as a multthreading wrapper for zstd, lz4 and lz5 +- zstandard has multithreading now on board, maybe I switch to it +- homepage of it: https://github.com/mcmilk/zstdmt -zstdmt_compress.c - -/TR 2016-12-26 +/TR 2017-05-17 diff --git a/C/zstdmt/lz4mt_compress.c b/C/zstdmt/lz4mt_compress.c index cbd98b1e..658a6901 100644 --- a/C/zstdmt/lz4mt_compress.c +++ b/C/zstdmt/lz4mt_compress.c @@ -1,6 +1,6 @@ /** - * Copyright (c) 2016 Tino Reichardt + * Copyright (c) 2016 - 2017 Tino Reichardt * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -333,7 +333,7 @@ size_t LZ4MT_compressCCtx(LZ4MT_CCtx * ctx, LZ4MT_RdWr_t * rdwr) /* wait for all workers */ for (t = 0; t < ctx->threads; t++) { cwork_t *w = &ctx->cwork[t]; - void *p; + void *p = 0; pthread_join(w->pthread, &p); if (p) retval_of_thread = p; diff --git a/C/zstdmt/lz4mt_decompress.c b/C/zstdmt/lz4mt_decompress.c index e509f49f..8ca27d19 100644 --- a/C/zstdmt/lz4mt_decompress.c +++ b/C/zstdmt/lz4mt_decompress.c @@ -1,6 +1,6 @@ /** - * Copyright (c) 2016 Tino Reichardt + * Copyright (c) 2016 - 2017 Tino Reichardt * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -542,7 +542,7 @@ size_t LZ4MT_decompressDCtx(LZ4MT_DCtx * ctx, LZ4MT_RdWr_t * rdwr) /* wait for all workers */ for (t = 0; t < ctx->threads; t++) { cwork_t *wt = &ctx->cwork[t]; - void *p; + void *p = 0; pthread_join(wt->pthread, &p); if (p) retval_of_thread = p; diff --git a/C/zstdmt/lz5mt_compress.c b/C/zstdmt/lz5mt_compress.c index 9f96e1a9..1ad5a582 100644 --- a/C/zstdmt/lz5mt_compress.c +++ b/C/zstdmt/lz5mt_compress.c @@ -1,6 +1,6 @@ /** - * Copyright (c) 2016 Tino Reichardt + * Copyright (c) 2016 - 2017 Tino Reichardt * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -333,7 +333,7 @@ size_t LZ5MT_compressCCtx(LZ5MT_CCtx * ctx, LZ5MT_RdWr_t * rdwr) /* wait for all workers */ for (t = 0; t < ctx->threads; t++) { cwork_t *w = &ctx->cwork[t]; - void *p; + void *p = 0; pthread_join(w->pthread, &p); if (p) retval_of_thread = p; diff --git a/C/zstdmt/lz5mt_decompress.c b/C/zstdmt/lz5mt_decompress.c index fc1f3d36..df306ef4 100644 --- a/C/zstdmt/lz5mt_decompress.c +++ b/C/zstdmt/lz5mt_decompress.c @@ -1,6 +1,6 @@ /** - * Copyright (c) 2016 Tino Reichardt + * Copyright (c) 2016 - 2017 Tino Reichardt * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -542,7 +542,7 @@ size_t LZ5MT_decompressDCtx(LZ5MT_DCtx * ctx, LZ5MT_RdWr_t * rdwr) /* wait for all workers */ for (t = 0; t < ctx->threads; t++) { cwork_t *wt = &ctx->cwork[t]; - void *p; + void *p = 0; pthread_join(wt->pthread, &p); if (p) retval_of_thread = p; diff --git a/C/zstdmt/zstdmt_compress.c b/C/zstdmt/zstdmt_compress.c index eaaf89af..6c546b37 100644 --- a/C/zstdmt/zstdmt_compress.c +++ b/C/zstdmt/zstdmt_compress.c @@ -1,6 +1,6 @@ /** - * Copyright (c) 2016 Tino Reichardt + * Copyright (c) 2016 - 2017 Tino Reichardt * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -355,7 +355,7 @@ size_t ZSTDMT_compressCCtx(ZSTDMT_CCtx * ctx, ZSTDMT_RdWr_t * rdwr) /* wait for all workers */ for (t = 0; t < ctx->threads; t++) { cwork_t *w = &ctx->cwork[t]; - void *p; + void *p = 0; pthread_join(w->pthread, &p); if (p) retval_of_thread = p; diff --git a/C/zstdmt/zstdmt_decompress.c b/C/zstdmt/zstdmt_decompress.c index 5882b01c..9ece55b9 100644 --- a/C/zstdmt/zstdmt_decompress.c +++ b/C/zstdmt/zstdmt_decompress.c @@ -1,6 +1,6 @@ /** - * Copyright (c) 2016 Tino Reichardt + * Copyright (c) 2016 - 2017 Tino Reichardt * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -817,7 +817,7 @@ size_t ZSTDMT_decompressDCtx(ZSTDMT_DCtx * ctx, ZSTDMT_RdWr_t * rdwr) /* wait for all workers */ for (t = 0; t < ctx->threads; t++) { cwork_t *wt = &ctx->cwork[t]; - void *p; + void *p = 0; pthread_join(wt->pthread, &p); if (p) retval_of_thread = p;