aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-07-01 15:02:04 +0000
committerChristian Grothoff <christian@grothoff.org>2010-07-01 15:02:04 +0000
commit5761831e7787b0b4db46ef0a59d09b731d081155 (patch)
tree9da3f1c75c47918272914354286a8a49923639d7
parent5beda76f6dfc4019fc640ee63a84b1495f782175 (diff)
downloadgnunet-5761831e7787b0b4db46ef0a59d09b731d081155.tar.gz
gnunet-5761831e7787b0b4db46ef0a59d09b731d081155.zip
fixing #1561
-rw-r--r--src/util/scheduler.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 347938c9a..ccf82148f 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -721,6 +721,14 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls)
721 abort (); 721 abort ();
722 break; 722 break;
723 } 723 }
724 if ((ret == 0) && (timeout.value == 0) && (busy_wait_warning > 16))
725 {
726 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
727 _("Looks like we're busy waiting...\n"));
728 sleep (1); /* mitigate */
729 }
730 check_ready (&sched, rs, ws);
731 run_ready (&sched, rs, ws);
724 if (GNUNET_NETWORK_fdset_handle_isset (rs, pr)) 732 if (GNUNET_NETWORK_fdset_handle_isset (rs, pr))
725 { 733 {
726 /* consume the signal */ 734 /* consume the signal */
@@ -737,14 +745,6 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls)
737 last_tr = sched.tasks_run; 745 last_tr = sched.tasks_run;
738 busy_wait_warning = 0; 746 busy_wait_warning = 0;
739 } 747 }
740 if ((ret == 0) && (timeout.value == 0) && (busy_wait_warning > 16))
741 {
742 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
743 _("Looks like we're busy waiting...\n"));
744 sleep (1); /* mitigate */
745 }
746 check_ready (&sched, rs, ws);
747 run_ready (&sched, rs, ws);
748 } 748 }
749 GNUNET_SIGNAL_handler_uninstall (shc_int); 749 GNUNET_SIGNAL_handler_uninstall (shc_int);
750 GNUNET_SIGNAL_handler_uninstall (shc_term); 750 GNUNET_SIGNAL_handler_uninstall (shc_term);
@@ -822,9 +822,7 @@ GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Handle *sched,
822 struct Task *prev; 822 struct Task *prev;
823 enum GNUNET_SCHEDULER_Priority p; 823 enum GNUNET_SCHEDULER_Priority p;
824 void *ret; 824 void *ret;
825#if EXECINFO 825
826 int i;
827#endif
828 prev = NULL; 826 prev = NULL;
829 t = sched->pending; 827 t = sched->pending;
830 while (t != NULL) 828 while (t != NULL)