aboutsummaryrefslogtreecommitdiff
path: root/src/lib/eventloop.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
commit56110d97bc423d8c4a2c8cd66b2bb8486b6ffd13 (patch)
tree7b48bacfa09b34ab988324498e0617732025a512 /src/lib/eventloop.c
parent1e2e74c3ce3ff0f02c1d3fe976fd7b2ba3d327d6 (diff)
downloadgnunet-gtk-56110d97bc423d8c4a2c8cd66b2bb8486b6ffd13.tar.gz
gnunet-gtk-56110d97bc423d8c4a2c8cd66b2bb8486b6ffd13.zip
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/lib/eventloop.c')
-rw-r--r--src/lib/eventloop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/eventloop.c b/src/lib/eventloop.c
index 1d47f04f..b978a340 100644
--- a/src/lib/eventloop.c
+++ b/src/lib/eventloop.c
@@ -55,7 +55,7 @@ struct GNUNET_GTK_MainLoop
55 /** 55 /**
56 * Initial task to run to setup the system. 56 * Initial task to run to setup the system.
57 */ 57 */
58 GNUNET_SCHEDULER_Task main_task; 58 GNUNET_SCHEDULER_TaskCallback main_task;
59 59
60 /** 60 /**
61 * Builder for the main window. 61 * Builder for the main window.
@@ -100,7 +100,7 @@ struct GNUNET_GTK_MainLoop
100 /** 100 /**
101 * Task we keep around just to keep the event loop running. 101 * Task we keep around just to keep the event loop running.
102 */ 102 */
103 GNUNET_SCHEDULER_TaskIdentifier dummy_task; 103 struct GNUNET_SCHEDULER_Task * dummy_task;
104 104
105 /** 105 /**
106 * Remaining command-line arguments. 106 * Remaining command-line arguments.
@@ -233,10 +233,10 @@ GNUNET_GTK_main_loop_quit (struct GNUNET_GTK_MainLoop *ml)
233{ 233{
234 g_main_loop_quit (ml->gml); 234 g_main_loop_quit (ml->gml);
235 ml->gml = NULL; 235 ml->gml = NULL;
236 if (GNUNET_SCHEDULER_NO_TASK != ml->dummy_task) 236 if (NULL != ml->dummy_task)
237 { 237 {
238 GNUNET_SCHEDULER_cancel (ml->dummy_task); 238 GNUNET_SCHEDULER_cancel (ml->dummy_task);
239 ml->dummy_task = GNUNET_SCHEDULER_NO_TASK; 239 ml->dummy_task = NULL;
240 } 240 }
241} 241}
242 242
@@ -989,7 +989,7 @@ GNUNET_GTK_main_loop_start (const char *binary_name, const char *binary_help,
989 int argc, char *const *argv, 989 int argc, char *const *argv,
990 struct GNUNET_GETOPT_CommandLineOption *options, 990 struct GNUNET_GETOPT_CommandLineOption *options,
991 const char *main_window_file, 991 const char *main_window_file,
992 GNUNET_SCHEDULER_Task main_task) 992 GNUNET_SCHEDULER_TaskCallback main_task)
993{ 993{
994 struct GNUNET_GTK_MainLoop ml; 994 struct GNUNET_GTK_MainLoop ml;
995 int ret; 995 int ret;