aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-revocation.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/revocation/gnunet-revocation.c
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
downloadgnunet-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/revocation/gnunet-revocation.c')
-rw-r--r--src/revocation/gnunet-revocation.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c
index 86e5c017d..f68c18aa4 100644
--- a/src/revocation/gnunet-revocation.c
+++ b/src/revocation/gnunet-revocation.c
@@ -84,11 +84,9 @@ static unsigned long long matching_bits;
84 * Function run if the user aborts with CTRL-C. 84 * Function run if the user aborts with CTRL-C.
85 * 85 *
86 * @param cls closure 86 * @param cls closure
87 * @param tc scheduler context
88 */ 87 */
89static void 88static void
90do_shutdown (void *cls, 89do_shutdown (void *cls)
91 const struct GNUNET_SCHEDULER_TaskContext *tc)
92{ 90{
93 if (NULL != el) 91 if (NULL != el)
94 { 92 {
@@ -231,15 +229,15 @@ perform_revocation (const struct RevocationData *rd)
231 * Perform the proof-of-work calculation. 229 * Perform the proof-of-work calculation.
232 * 230 *
233 * @param cls the `struct RevocationData` 231 * @param cls the `struct RevocationData`
234 * @param tc scheduler context
235 */ 232 */
236static void 233static void
237calculate_pow (void *cls, 234calculate_pow (void *cls)
238 const struct GNUNET_SCHEDULER_TaskContext *tc)
239{ 235{
240 struct RevocationData *rd = cls; 236 struct RevocationData *rd = cls;
237 const struct GNUNET_SCHEDULER_TaskContext *tc;
241 238
242 /* store temporary results */ 239 /* store temporary results */
240 tc = GNUNET_SCHEDULER_get_task_context ();
243 if ( (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) || 241 if ( (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) ||
244 (0 == (rd->pow % 128) ) ) 242 (0 == (rd->pow % 128) ) )
245 { 243 {