From 29e6158507a0758192075ac6ece7ba8e75ddc49a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 9 Apr 2016 23:14:03 +0000 Subject: 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() --- src/datastore/perf_datastore_api.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/datastore/perf_datastore_api.c') diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index e430bfe93..41cac1283 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c @@ -186,11 +186,9 @@ struct CpsRunContext * depending on the current state. * * @param cls the `struct CpsRunContext` - * @param tc scheduler context (unused) */ static void -run_continuation (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +run_continuation (void *cls); /** @@ -344,18 +342,18 @@ delete_value (void *cls, * depending on the current state. * * @param cls the `struct CpsRunContext` - * @param tc scheduler context (unused) */ static void -run_continuation (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run_continuation (void *cls) { struct CpsRunContext *crc = cls; size_t size; static struct GNUNET_HashCode key; static char data[65536]; char gstr[128]; + const struct GNUNET_SCHEDULER_TaskContext *tc; + tc = GNUNET_SCHEDULER_get_task_context (); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) crc->phase = RP_ERROR; ok = (int) crc->phase; -- cgit v1.2.3