aboutsummaryrefslogtreecommitdiff
path: root/src/solvers
diff options
context:
space:
mode:
Diffstat (limited to 'src/solvers')
-rw-r--r--src/solvers/h48/solve.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h
index 8716bb0..7e2e5c1 100644
--- a/src/solvers/h48/solve.h
+++ b/src/solvers/h48/solve.h
@@ -554,7 +554,7 @@ solve_h48(
554 } 554 }
555 555
556 /* Log solutions and handle pause / stop / resume */ 556 /* Log solutions and handle pause / stop / resume */
557 if (d >= 15 && NISSY_CANSLEEP) { 557 if (poll_status != NULL && d >= 15 && NISSY_CANSLEEP) {
558 td = false; 558 td = false;
559 fp = true; 559 fp = true;
560 while (!td && status != NISSY_STATUS_STOP) { 560 while (!td && status != NISSY_STATUS_STOP) {
@@ -565,16 +565,13 @@ solve_h48(
565 lastused = sollist.used; 565 lastused = sollist.used;
566 pthread_mutex_unlock(&solutions_mutex); 566 pthread_mutex_unlock(&solutions_mutex);
567 567
568 if (poll_status != NULL) { 568 status = poll_status(poll_status_data);
569 status = poll_status(poll_status_data); 569 if (status == NISSY_STATUS_PAUSE && fp) {
570 if (status == NISSY_STATUS_PAUSE && fp) 570 LOG("[H48 solve] Paused\n");
571 { 571 fp = false;
572 LOG("[H48 solve] Paused\n");
573 fp = false;
574 }
575 if (status == NISSY_STATUS_RUN)
576 fp = true;
577 } 572 }
573 if (status == NISSY_STATUS_RUN)
574 fp = true;
578 575
579 for (td = true, i = 0; i < threads; i++) 576 for (td = true, i = 0; i < threads; i++)
580 td = td && arg[i].thread_done; 577 td = td && arg[i].thread_done;

Generated with cgit - Back to sebastiano.tronto.net