|
|
@@ -1826,7 +1826,8 @@ static void cpudev(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *p
|
|
|
bool io_open = false;
|
|
|
int id;
|
|
|
|
|
|
- if (opt_n_threads == 0) {
|
|
|
+ if (opt_n_threads <= 0)
|
|
|
+ {
|
|
|
message(io_data, MSG_CPUNON, 0, NULL, isjson);
|
|
|
return;
|
|
|
}
|
|
|
@@ -1976,7 +1977,7 @@ static void summary(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __mayb
|
|
|
|
|
|
root = api_add_elapsed(root, "Elapsed", &(total_secs), true);
|
|
|
#ifdef WANT_CPUMINE
|
|
|
- if (opt_n_threads)
|
|
|
+ if (opt_n_threads > 0)
|
|
|
root = api_add_string(root, "Algorithm", algo, false);
|
|
|
#endif
|
|
|
root = api_add_mhs(root, "MHS av", &(mhs), false);
|
|
|
@@ -2171,7 +2172,8 @@ static void cpuenable(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char
|
|
|
{
|
|
|
int id;
|
|
|
|
|
|
- if (opt_n_threads == 0) {
|
|
|
+ if (opt_n_threads <= 0)
|
|
|
+ {
|
|
|
message(io_data, MSG_CPUNON, 0, NULL, isjson);
|
|
|
return;
|
|
|
}
|
|
|
@@ -2209,7 +2211,8 @@ static void cpudisable(struct io_data *io_data, __maybe_unused SOCKETTYPE c, cha
|
|
|
{
|
|
|
int id;
|
|
|
|
|
|
- if (opt_n_threads == 0) {
|
|
|
+ if (opt_n_threads <= 0)
|
|
|
+ {
|
|
|
message(io_data, MSG_CPUNON, 0, NULL, isjson);
|
|
|
return;
|
|
|
}
|
|
|
@@ -2242,7 +2245,8 @@ static void cpurestart(struct io_data *io_data, __maybe_unused SOCKETTYPE c, cha
|
|
|
{
|
|
|
int id;
|
|
|
|
|
|
- if (opt_n_threads == 0) {
|
|
|
+ if (opt_n_threads <= 0)
|
|
|
+ {
|
|
|
message(io_data, MSG_CPUNON, 0, NULL, isjson);
|
|
|
return;
|
|
|
}
|