-more datacache integration work
[oweals/gnunet.git] / src / testbed / gnunet-service-testbed_cpustatus.c
index 4071c717259f461164e5ad0a2fe1c8350714712a..44d1c7624a158843e00a85d629a81a7fef0f13b1 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2008--2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2008--2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -54,6 +54,9 @@
 
 static processor_cpu_load_info_t prev_cpu_load;
 #endif
+#ifdef WINDOWS
+#include <winternl.h>
+#endif
 
 #define DEBUG_STATUSCALLS GNUNET_NO
 
@@ -82,7 +85,7 @@ static double agedIOLoad = -1;
  */
 struct GNUNET_BIO_WriteHandle *bw;
 
-GNUNET_SCHEDULER_TaskIdentifier sample_load_task_id;
+struct GNUNET_SCHEDULER_Task * sample_load_task_id;
 
 
 #ifdef OSX
@@ -653,7 +656,7 @@ sample_load_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   unsigned int mem_usage;
   unsigned int nproc;
 
-  sample_load_task_id = GNUNET_SCHEDULER_NO_TASK;
+  sample_load_task_id = NULL;
   if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason))
     return;
   ld_cpu = cpu_get_load ();
@@ -764,10 +767,10 @@ GST_stats_destroy ()
 #elif OSX
   GNUNET_free_non_null (prev_cpu_load);
 #endif
-  if (GNUNET_SCHEDULER_NO_TASK != sample_load_task_id)
+  if (NULL != sample_load_task_id)
   {
     GNUNET_SCHEDULER_cancel (sample_load_task_id);
-    sample_load_task_id = GNUNET_SCHEDULER_NO_TASK;
+    sample_load_task_id = NULL;
   }
   GNUNET_break (GNUNET_OK == GNUNET_BIO_write_close (bw));
   bw = NULL;