From ee1871d3f857a056593ca0d390ce25b6ae492feb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 7 Feb 2023 14:46:41 +0900 Subject: [PATCH] Enable iwasm --max-threads option for wasi-threads as well (#1939) --- product-mini/platforms/posix/main.c | 4 ++-- product-mini/platforms/windows/main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/product-mini/platforms/posix/main.c b/product-mini/platforms/posix/main.c index e04745c6..06fd3209 100644 --- a/product-mini/platforms/posix/main.c +++ b/product-mini/platforms/posix/main.c @@ -67,7 +67,7 @@ print_help() printf(" --module-path= Indicate a module search path. default is current\n" " directory('./')\n"); #endif -#if WASM_ENABLE_LIB_PTHREAD != 0 +#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0 printf(" --max-threads=n Set maximum thread number per cluster, default is 4\n"); #endif #if WASM_ENABLE_DEBUG_INTERP != 0 @@ -499,7 +499,7 @@ main(int argc, char *argv[]) } } #endif -#if WASM_ENABLE_LIB_PTHREAD != 0 +#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0 else if (!strncmp(argv[0], "--max-threads=", 14)) { if (argv[0][14] == '\0') return print_help(); diff --git a/product-mini/platforms/windows/main.c b/product-mini/platforms/windows/main.c index 14c25596..6de76cca 100644 --- a/product-mini/platforms/windows/main.c +++ b/product-mini/platforms/windows/main.c @@ -43,7 +43,7 @@ print_help() printf(" --module-path= Indicate a module search path. default is current\n" " directory('./')\n"); #endif -#if WASM_ENABLE_LIB_PTHREAD != 0 +#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0 printf(" --max-threads=n Set maximum thread number per cluster, default is 4\n"); #endif #if WASM_ENABLE_DEBUG_INTERP != 0 @@ -317,7 +317,7 @@ main(int argc, char *argv[]) } } #endif -#if WASM_ENABLE_LIB_PTHREAD != 0 +#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0 else if (!strncmp(argv[0], "--max-threads=", 14)) { if (argv[0][14] == '\0') return print_help();