aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/perf_plugin_datastore.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
commit29e6158507a0758192075ac6ece7ba8e75ddc49a (patch)
treeb91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/datastore/perf_plugin_datastore.c
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/datastore/perf_plugin_datastore.c')
-rw-r--r--src/datastore/perf_plugin_datastore.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 4365fbd258..0aeb426abf 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -99,8 +99,7 @@ disk_utilization_change_cb (void *cls, int delta)
static void
-test (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+test (void *cls);
/**
@@ -115,8 +114,8 @@ test (void *cls,
static void
put_continuation (void *cls,
const struct GNUNET_HashCode *key,
- uint32_t size,
- int status,
+ uint32_t size,
+ int status,
const char *msg)
{
struct CpsRunContext *crc = cls;
@@ -376,7 +375,7 @@ unload_plugin (struct GNUNET_DATASTORE_PluginFunctions *api,
* the transport and core.
*/
static void
-cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleaning_task (void *cls)
{
struct CpsRunContext *crc = cls;
@@ -386,10 +385,12 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+test (void *cls)
{
struct CpsRunContext *crc = cls;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
+ tc = GNUNET_SCHEDULER_get_task_context ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
{
GNUNET_break (0);