commit fbeebeca5ccc0586b0374389dfcaa38e1c8b9715
parent 6ce1e8ac1816b1f4847232017d643cb3116fd1a9
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 17 Jan 2025 16:14:13 +0100
Rename option -s (single threaded execution) in -1
Just to make room for another use for option -s
Diffstat:
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/doc/city_generator2.1.in b/doc/city_generator2.1.in
@@ -97,12 +97,6 @@ construction mode among other things.
Please refer to
.Xr city_generator2-input 5
for more information on formats.
-.It Fl s
-Force single threaded execution.
-By default use as many threads as available.
-Note however that only some parts of the processing is parallelized.
-Therefore, poor speedup when run multithreaded is not a bug and can even be
-expected.
.It Fl v
Output version information and exit.
.It Fl V Ar level
@@ -124,6 +118,12 @@ All the messages are written to standard error.
Default verbosity
.Ar level
is @CG2_ARGS_DEFAULT_VERBOSITY_LEVEL@.
+.It Fl 1
+Force single threaded execution.
+By default use as many threads as available.
+Note however that only a small part of the processing is parallelized.
+Therefore, poor speedup when run multithreaded is not a bug and can even be
+expected.
.El
.Sh EXIT STATUS
.Ex -std
diff --git a/src/cg_args.c b/src/cg_args.c
@@ -114,7 +114,7 @@ parse_args
int opt;
int info_provided = 0, c_provided = 0, m_provided = 0;
struct args* args;
- char option_list[] = "?c:m:hkEF:f:svV:";
+ char option_list[] = "?c:m:hkEF:f:vV:1";
ASSERT(allocator && logger && argv && out_args);
@@ -211,9 +211,6 @@ parse_args
args->keep_running_on_errors = 1;
break;
- case 's':
- args->single_thread = 1;
- break;
case 'v':
info_provided = 1;
@@ -233,6 +230,10 @@ parse_args
goto error;
}
break;
+
+ case '1':
+ args->single_thread = 1;
+ break;
}
}