summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.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/transport/plugin_transport_unix.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/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 5ad5a0432..e320785d4 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -498,11 +498,9 @@ unix_plugin_session_disconnect (void *cls,
* Session was idle for too long, so disconnect it
*
* @param cls the `struct GNUNET_ATS_Session *` to disconnect
- * @param tc scheduler context
*/
static void
-session_timeout (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+session_timeout (void *cls)
{
struct GNUNET_ATS_Session *session = cls;
struct GNUNET_TIME_Relative left;
@@ -1225,14 +1223,14 @@ unix_plugin_do_write (struct Plugin *plugin)
* Then reschedule this function to be called again once more is available.
*
* @param cls the plugin handle
- * @param tc the scheduling context
*/
static void
-unix_plugin_select_read (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+unix_plugin_select_read (void *cls)
{
struct Plugin *plugin = cls;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
+ tc = GNUNET_SCHEDULER_get_task_context ();
plugin->read_task = NULL;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
@@ -1250,14 +1248,14 @@ unix_plugin_select_read (void *cls,
* Then reschedule this function to be called again once more is available.
*
* @param cls the plugin handle
- * @param tc the scheduling context
*/
static void
-unix_plugin_select_write (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+unix_plugin_select_write (void *cls)
{
struct Plugin *plugin = cls;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
+ tc = GNUNET_SCHEDULER_get_task_context ();
plugin->write_task = NULL;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
@@ -1617,11 +1615,9 @@ unix_plugin_string_to_address (void *cls,
* Notify transport service about address
*
* @param cls the plugin
- * @param tc unused
*/
static void
-address_notification (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+address_notification (void *cls)
{
struct Plugin *plugin = cls;
struct GNUNET_HELLO_Address *address;