Skip to content

Commit ee1871d

Browse files
authored
Enable iwasm --max-threads option for wasi-threads as well (#1939)
1 parent aab875b commit ee1871d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

product-mini/platforms/posix/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ print_help()
6767
printf(" --module-path=<path> Indicate a module search path. default is current\n"
6868
" directory('./')\n");
6969
#endif
70-
#if WASM_ENABLE_LIB_PTHREAD != 0
70+
#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0
7171
printf(" --max-threads=n Set maximum thread number per cluster, default is 4\n");
7272
#endif
7373
#if WASM_ENABLE_DEBUG_INTERP != 0
@@ -499,7 +499,7 @@ main(int argc, char *argv[])
499499
}
500500
}
501501
#endif
502-
#if WASM_ENABLE_LIB_PTHREAD != 0
502+
#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0
503503
else if (!strncmp(argv[0], "--max-threads=", 14)) {
504504
if (argv[0][14] == '\0')
505505
return print_help();

product-mini/platforms/windows/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ print_help()
4343
printf(" --module-path=<path> Indicate a module search path. default is current\n"
4444
" directory('./')\n");
4545
#endif
46-
#if WASM_ENABLE_LIB_PTHREAD != 0
46+
#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0
4747
printf(" --max-threads=n Set maximum thread number per cluster, default is 4\n");
4848
#endif
4949
#if WASM_ENABLE_DEBUG_INTERP != 0
@@ -317,7 +317,7 @@ main(int argc, char *argv[])
317317
}
318318
}
319319
#endif
320-
#if WASM_ENABLE_LIB_PTHREAD != 0
320+
#if WASM_ENABLE_LIB_PTHREAD != 0 || WASM_ENABLE_LIB_WASI_THREADS != 0
321321
else if (!strncmp(argv[0], "--max-threads=", 14)) {
322322
if (argv[0][14] == '\0')
323323
return print_help();

0 commit comments

Comments
 (0)