diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
commit | 29e6158507a0758192075ac6ece7ba8e75ddc49a (patch) | |
tree | b91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/arm/gnunet-arm.c | |
parent | 5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff) | |
download | gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.tar.gz gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.zip |
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/arm/gnunet-arm.c')
-rw-r--r-- | src/arm/gnunet-arm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 726365ede..af85372d8 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -179,10 +179,9 @@ delete_files () | |||
179 | * jobs that we've been asked to do in order. | 179 | * jobs that we've been asked to do in order. |
180 | * | 180 | * |
181 | * @param cls closure, unused | 181 | * @param cls closure, unused |
182 | * @param tc context, unused | ||
183 | */ | 182 | */ |
184 | static void | 183 | static void |
185 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 184 | shutdown_task (void *cls) |
186 | { | 185 | { |
187 | if (NULL != h) | 186 | if (NULL != h) |
188 | { | 187 | { |
@@ -269,10 +268,9 @@ ret_string (enum GNUNET_ARM_Result result) | |||
269 | * Main task that runs our various operations in order. | 268 | * Main task that runs our various operations in order. |
270 | * | 269 | * |
271 | * @param cls closure | 270 | * @param cls closure |
272 | * @param tc scheudler context | ||
273 | */ | 271 | */ |
274 | static void | 272 | static void |
275 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 273 | action_loop (void *cls); |
276 | 274 | ||
277 | 275 | ||
278 | /** | 276 | /** |
@@ -539,11 +537,13 @@ list_callback (void *cls, | |||
539 | * do, in order. | 537 | * do, in order. |
540 | * | 538 | * |
541 | * @param cls closure, unused | 539 | * @param cls closure, unused |
542 | * @param tc context, unused | ||
543 | */ | 540 | */ |
544 | static void | 541 | static void |
545 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 542 | action_loop (void *cls) |
546 | { | 543 | { |
544 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
545 | |||
546 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
547 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 547 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
548 | return; | 548 | return; |
549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n"); | 549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n"); |