aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2014-03-10 13:51:09 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2014-03-10 13:51:09 +0000
commitf4a2046b53dbe54ee9f101ea6d2a5d981290faf4 (patch)
treeae1a6deaaa09e72d6f83392db6e097046069dd0e /src/util
parent2688a53703e3e1b4353aee8fc425fd1f6a793125 (diff)
downloadgnunet-f4a2046b53dbe54ee9f101ea6d2a5d981290faf4.tar.gz
gnunet-f4a2046b53dbe54ee9f101ea6d2a5d981290faf4.zip
- Expose speedup routines as an internal header.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Makefile.am2
-rw-r--r--src/util/program.c18
-rw-r--r--src/util/service.c17
-rw-r--r--src/util/speedup.c1
4 files changed, 4 insertions, 34 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 41f5a599b..5d3f6771c 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -118,7 +118,7 @@ libgnunetutil_la_SOURCES = \
118 signal.c \ 118 signal.c \
119 strings.c \ 119 strings.c \
120 time.c \ 120 time.c \
121 speedup.c 121 speedup.c speedup.h
122 122
123libgnunetutil_la_LIBADD = \ 123libgnunetutil_la_LIBADD = \
124 $(GCLIBADD) $(WINLIB) \ 124 $(GCLIBADD) $(WINLIB) \
diff --git a/src/util/program.c b/src/util/program.c
index 1d26cf937..19e0ae97b 100644
--- a/src/util/program.c
+++ b/src/util/program.c
@@ -28,6 +28,7 @@
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29#include "gnunet_resolver_service.h" 29#include "gnunet_resolver_service.h"
30#include "gnunet_constants.h" 30#include "gnunet_constants.h"
31#include "speedup.h"
31#include <gcrypt.h> 32#include <gcrypt.h>
32 33
33#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 34#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
@@ -68,23 +69,6 @@ struct CommandContext
68 69
69 70
70/** 71/**
71 * Start task that may speed up our system clock artificially
72 *
73 * @param cfg configuration to use
74 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the speedup was not configured
75 */
76int
77GNUNET_SPEEDUP_start_ (const struct GNUNET_CONFIGURATION_Handle *cfg);
78
79
80/**
81 * Stop tasks that modify clock behavior.
82 */
83void
84GNUNET_SPEEDUP_stop_ (void);
85
86
87/**
88 * Initial task called by the scheduler for each 72 * Initial task called by the scheduler for each
89 * program. Runs the program-specific main task. 73 * program. Runs the program-specific main task.
90 */ 74 */
diff --git a/src/util/service.c b/src/util/service.c
index deb0be46b..ef6206bdc 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -28,6 +28,7 @@
28#include "gnunet_protocols.h" 28#include "gnunet_protocols.h"
29#include "gnunet_constants.h" 29#include "gnunet_constants.h"
30#include "gnunet_resolver_service.h" 30#include "gnunet_resolver_service.h"
31#include "speedup.h"
31 32
32#if HAVE_MALLINFO 33#if HAVE_MALLINFO
33#include <malloc.h> 34#include <malloc.h>
@@ -45,22 +46,6 @@
45/* ******************* access control ******************** */ 46/* ******************* access control ******************** */
46 47
47/** 48/**
48 * Start task that may speed up our system clock artificially
49 *
50 * @param cfg configuration to use
51 * @return GNUNET_OK on success, GNUNET_SYSERR if the speedup was not configured
52 */
53int
54GNUNET_SPEEDUP_start_ (const struct GNUNET_CONFIGURATION_Handle *cfg);
55
56/**
57 * Stop tasks that modify clock behavior.
58 */
59void
60GNUNET_SPEEDUP_stop_ (void);
61
62
63/**
64 * Check if the given IP address is in the list of IP addresses. 49 * Check if the given IP address is in the list of IP addresses.
65 * 50 *
66 * @param list a list of networks 51 * @param list a list of networks
diff --git a/src/util/speedup.c b/src/util/speedup.c
index c038c3858..d71e7c158 100644
--- a/src/util/speedup.c
+++ b/src/util/speedup.c
@@ -25,6 +25,7 @@
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h" 27#include "gnunet_util_lib.h"
28#include "speedup.h"
28 29
29#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 30#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
30 31