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/dv | |
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/dv')
-rw-r--r-- | src/dv/gnunet-dv.c | 4 | ||||
-rw-r--r-- | src/dv/gnunet-service-dv.c | 16 | ||||
-rw-r--r-- | src/dv/test_transport_dv.c | 3 |
3 files changed, 6 insertions, 17 deletions
diff --git a/src/dv/gnunet-dv.c b/src/dv/gnunet-dv.c index 42234ad21..d5d95acca 100644 --- a/src/dv/gnunet-dv.c +++ b/src/dv/gnunet-dv.c | |||
@@ -119,11 +119,9 @@ message_cb (void *cls, | |||
119 | * Task run on shutdown. | 119 | * Task run on shutdown. |
120 | * | 120 | * |
121 | * @param cls NULL | 121 | * @param cls NULL |
122 | * @param tc unused | ||
123 | */ | 122 | */ |
124 | static void | 123 | static void |
125 | shutdown_task (void *cls, | 124 | shutdown_task (void *cls) |
126 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
127 | { | 125 | { |
128 | GNUNET_DV_service_disconnect (sh); | 126 | GNUNET_DV_service_disconnect (sh); |
129 | sh = NULL; | 127 | sh = NULL; |
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 2ddd99197..bd0057ab4 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -398,11 +398,9 @@ static int in_shutdown; | |||
398 | * | 398 | * |
399 | * @param cls the 'struct DirectNeighbor' of the peer we're building | 399 | * @param cls the 'struct DirectNeighbor' of the peer we're building |
400 | * a routing consensus with | 400 | * a routing consensus with |
401 | * @param tc scheduler context | ||
402 | */ | 401 | */ |
403 | static void | 402 | static void |
404 | initiate_set_union (void *cls, | 403 | initiate_set_union (void *cls); |
405 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
406 | 404 | ||
407 | 405 | ||
408 | /** | 406 | /** |
@@ -1132,11 +1130,9 @@ refresh_routes (void *cls, | |||
1132 | * Task to run #refresh_routes() on all direct neighbours. | 1130 | * Task to run #refresh_routes() on all direct neighbours. |
1133 | * | 1131 | * |
1134 | * @param cls NULL | 1132 | * @param cls NULL |
1135 | * @param tc unused | ||
1136 | */ | 1133 | */ |
1137 | static void | 1134 | static void |
1138 | refresh_routes_task (void *cls, | 1135 | refresh_routes_task (void *cls) |
1139 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1140 | { | 1136 | { |
1141 | rr_task = NULL; | 1137 | rr_task = NULL; |
1142 | GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors, | 1138 | GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors, |
@@ -1692,11 +1688,9 @@ listen_set_union (void *cls, | |||
1692 | * | 1688 | * |
1693 | * @param cls the `struct DirectNeighbor *` of the peer we're building | 1689 | * @param cls the `struct DirectNeighbor *` of the peer we're building |
1694 | * a routing consensus with | 1690 | * a routing consensus with |
1695 | * @param tc scheduler context | ||
1696 | */ | 1691 | */ |
1697 | static void | 1692 | static void |
1698 | initiate_set_union (void *cls, | 1693 | initiate_set_union (void *cls) |
1699 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1700 | { | 1694 | { |
1701 | struct DirectNeighbor *neighbor = cls; | 1695 | struct DirectNeighbor *neighbor = cls; |
1702 | 1696 | ||
@@ -2082,11 +2076,9 @@ free_direct_neighbors (void *cls, | |||
2082 | * Task run during shutdown. | 2076 | * Task run during shutdown. |
2083 | * | 2077 | * |
2084 | * @param cls unused | 2078 | * @param cls unused |
2085 | * @param tc unused | ||
2086 | */ | 2079 | */ |
2087 | static void | 2080 | static void |
2088 | shutdown_task (void *cls, | 2081 | shutdown_task (void *cls) |
2089 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2090 | { | 2082 | { |
2091 | unsigned int i; | 2083 | unsigned int i; |
2092 | 2084 | ||
diff --git a/src/dv/test_transport_dv.c b/src/dv/test_transport_dv.c index 245914f07..1afa30fa9 100644 --- a/src/dv/test_transport_dv.c +++ b/src/dv/test_transport_dv.c | |||
@@ -36,8 +36,7 @@ static struct GNUNET_SCHEDULER_Task * shutdown_task; | |||
36 | 36 | ||
37 | 37 | ||
38 | static void | 38 | static void |
39 | do_shutdown (void *cls, | 39 | do_shutdown (void *cls) |
40 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
41 | { | 40 | { |
42 | shutdown_task = NULL; | 41 | shutdown_task = NULL; |
43 | if (NULL != topology_op) | 42 | if (NULL != topology_op) |