aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-04-04 11:07:00 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-04-04 11:07:00 +0000
commit6713f0ce7d70cdb5cb0172157e647b8dfb6852ff (patch)
tree3cda79ccfe6ba87b76fadfe046382a4206aa7c18 /src
parent155e24361788c1dfe6fae4c0f42fb836ca62e775 (diff)
downloadgnunet-6713f0ce7d70cdb5cb0172157e647b8dfb6852ff.tar.gz
gnunet-6713f0ce7d70cdb5cb0172157e647b8dfb6852ff.zip
- dead code
Diffstat (limited to 'src')
-rw-r--r--src/testbed/gnunet-service-testbed_cpustatus.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c
index 55b9cafbc..7692a1389 100644
--- a/src/testbed/gnunet-service-testbed_cpustatus.c
+++ b/src/testbed/gnunet-service-testbed_cpustatus.c
@@ -516,8 +516,6 @@ updateUsage ()
516 return GNUNET_SYSERR; 516 return GNUNET_SYSERR;
517} 517}
518 518
519struct GNUNET_GE_Context;
520struct GNUNET_GC_Configuration;
521 519
522/** 520/**
523 * Update load values (if enough time has expired), 521 * Update load values (if enough time has expired),
@@ -525,8 +523,7 @@ struct GNUNET_GC_Configuration;
525 * that lock has already been obtained. 523 * that lock has already been obtained.
526 */ 524 */
527static void 525static void
528updateAgedLoad (struct GNUNET_GE_Context *ectx, 526updateAgedLoad ()
529 struct GNUNET_GC_Configuration *cfg)
530{ 527{
531 static struct GNUNET_TIME_Absolute lastCall; 528 static struct GNUNET_TIME_Absolute lastCall;
532 struct GNUNET_TIME_Relative age; 529 struct GNUNET_TIME_Relative age;
@@ -584,10 +581,9 @@ updateAgedLoad (struct GNUNET_GE_Context *ectx,
584 * (100 is equivalent to full load) 581 * (100 is equivalent to full load)
585 */ 582 */
586int 583int
587GNUNET_cpu_get_load (struct GNUNET_GE_Context *ectx, 584GST_cpu_get_load ()
588 struct GNUNET_GC_Configuration *cfg)
589{ 585{
590 updateAgedLoad (ectx, cfg); 586 updateAgedLoad ();
591 return (int) agedCPULoad; 587 return (int) agedCPULoad;
592} 588}
593 589
@@ -598,10 +594,9 @@ GNUNET_cpu_get_load (struct GNUNET_GE_Context *ectx,
598 * (100 is equivalent to full load) 594 * (100 is equivalent to full load)
599 */ 595 */
600int 596int
601GNUNET_disk_get_load (struct GNUNET_GE_Context *ectx, 597GST_disk_get_load ()
602 struct GNUNET_GC_Configuration *cfg)
603{ 598{
604 updateAgedLoad (ectx, cfg); 599 updateAgedLoad ();
605 return (int) agedIOLoad; 600 return (int) agedIOLoad;
606} 601}
607 602
@@ -610,7 +605,8 @@ GNUNET_disk_get_load (struct GNUNET_GE_Context *ectx,
610 * routines. After that it is safe to call each of the status calls separately 605 * routines. After that it is safe to call each of the status calls separately
611 * @return GNUNET_OK on success and GNUNET_SYSERR on error (or calls errexit). 606 * @return GNUNET_OK on success and GNUNET_SYSERR on error (or calls errexit).
612 */ 607 */
613void __attribute__ ((constructor)) GNUNET_cpustats_ltdl_init () 608void
609GST_stats_init ()
614{ 610{
615#ifdef LINUX 611#ifdef LINUX
616 proc_stat = fopen ("/proc/stat", "r"); 612 proc_stat = fopen ("/proc/stat", "r");
@@ -628,7 +624,8 @@ void __attribute__ ((constructor)) GNUNET_cpustats_ltdl_init ()
628/** 624/**
629 * Shutdown the status calls module. 625 * Shutdown the status calls module.
630 */ 626 */
631void __attribute__ ((destructor)) GNUNET_cpustats_ltdl_fini () 627void
628GST_stats_destroy ()
632{ 629{
633#ifdef LINUX 630#ifdef LINUX
634 if (proc_stat != NULL) 631 if (proc_stat != NULL)