1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-05 19:15:58 +03:00

Change param name to ZSTDCLI_NUMTHREADS_DEFAULT

This commit is contained in:
senhuang42
2020-09-07 18:11:42 -04:00
parent 972e063219
commit 888c385a49

View File

@@ -16,15 +16,13 @@
# define ZSTDCLI_CLEVEL_DEFAULT 3 # define ZSTDCLI_CLEVEL_DEFAULT 3
#endif #endif
#ifndef ZSTD_NUMTHREADS_DEFAULT
# define ZSTD_NUMTHREADS_DEFAULT 1
#endif
#ifndef ZSTDCLI_CLEVEL_MAX #ifndef ZSTDCLI_CLEVEL_MAX
# define ZSTDCLI_CLEVEL_MAX 19 /* without using --ultra */ # define ZSTDCLI_CLEVEL_MAX 19 /* without using --ultra */
#endif #endif
#ifndef ZSTDCLI_NUMTHREADS_DEFAULT
# define ZSTDCLI_NUMTHREADS_DEFAULT 1
#endif
/*-************************************ /*-************************************
* Dependencies * Dependencies
@@ -628,7 +626,7 @@ static unsigned init_numThreads(void) {
unsigned numThreads; unsigned numThreads;
if (readU32FromCharChecked(&ptr, &numThreads)) { if (readU32FromCharChecked(&ptr, &numThreads)) {
DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: numeric value too large \n", ENV_NUMTHREADS, env); DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: numeric value too large \n", ENV_NUMTHREADS, env);
return ZSTD_NUMTHREADS_DEFAULT; return ZSTDCLI_NUMTHREADS_DEFAULT;
} else if (*ptr == 0) { } else if (*ptr == 0) {
return numThreads; return numThreads;
} }
@@ -636,7 +634,7 @@ static unsigned init_numThreads(void) {
DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: not a valid unsigned value \n", ENV_NUMTHREADS, env); DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: not a valid unsigned value \n", ENV_NUMTHREADS, env);
} }
return ZSTD_NUMTHREADS_DEFAULT; return ZSTDCLI_NUMTHREADS_DEFAULT;
} }
#define NEXT_FIELD(ptr) { \ #define NEXT_FIELD(ptr) { \
@@ -680,7 +678,6 @@ typedef enum { zom_compress, zom_decompress, zom_test, zom_bench, zom_train, zom
# define MAXCLEVEL ZSTD_maxCLevel() # define MAXCLEVEL ZSTD_maxCLevel()
#endif #endif
int main(int const argCount, const char* argv[]) int main(int const argCount, const char* argv[])
{ {
int argNb, int argNb,