aboutsummaryrefslogtreecommitdiff
path: root/src/util/os_priority.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r--src/util/os_priority.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 52e2f6d0e..8dfec6c5e 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -70,18 +70,19 @@ static struct GNUNET_OS_Process current_process;
70 * This handler is called when there are control data to be read on the pipe 70 * This handler is called when there are control data to be read on the pipe
71 * 71 *
72 * @param cls the 'struct GNUNET_DISK_FileHandle' of the control pipe 72 * @param cls the 'struct GNUNET_DISK_FileHandle' of the control pipe
73 * @param tc scheduler context
74 */ 73 */
75static void 74static void
76parent_control_handler (void *cls, 75parent_control_handler (void *cls)
77 const struct GNUNET_SCHEDULER_TaskContext *tc)
78{ 76{
79 struct GNUNET_DISK_FileHandle *control_pipe = cls; 77 struct GNUNET_DISK_FileHandle *control_pipe = cls;
78 const struct GNUNET_SCHEDULER_TaskContext *tc;
80 char sig; 79 char sig;
81 char *pipe_fd; 80 char *pipe_fd;
82 ssize_t ret; 81 ssize_t ret;
83 82
84 LOG (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n", __FUNCTION__, 83 tc = GNUNET_SCHEDULER_get_task_context ();
84 LOG (GNUNET_ERROR_TYPE_DEBUG,
85 "`%s' invoked because of %d\n", __FUNCTION__,
85 tc->reason); 86 tc->reason);
86 if (0 != (tc->reason & 87 if (0 != (tc->reason &
87 (GNUNET_SCHEDULER_REASON_SHUTDOWN | GNUNET_SCHEDULER_REASON_TIMEOUT))) 88 (GNUNET_SCHEDULER_REASON_SHUTDOWN | GNUNET_SCHEDULER_REASON_TIMEOUT)))
@@ -118,12 +119,9 @@ parent_control_handler (void *cls,
118 * variable) and raise those signals. 119 * variable) and raise those signals.
119 * 120 *
120 * @param cls closure (unused) 121 * @param cls closure (unused)
121 * @param tc scheduler context (unused)
122 */ 122 */
123void 123void
124GNUNET_OS_install_parent_control_handler (void *cls, 124GNUNET_OS_install_parent_control_handler (void *cls)
125 const struct
126 GNUNET_SCHEDULER_TaskContext *tc)
127{ 125{
128 const char *env_buf; 126 const char *env_buf;
129 char *env_buf_end; 127 char *env_buf_end;
@@ -1751,18 +1749,19 @@ GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd)
1751/** 1749/**
1752 * Read from the process and call the line processor. 1750 * Read from the process and call the line processor.
1753 * 1751 *
1754 * @param cls the 'struct GNUNET_OS_CommandHandle' 1752 * @param cls the `struct GNUNET_OS_CommandHandle *`
1755 * @param tc scheduler context
1756 */ 1753 */
1757static void 1754static void
1758cmd_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 1755cmd_read (void *cls)
1759{ 1756{
1760 struct GNUNET_OS_CommandHandle *cmd = cls; 1757 struct GNUNET_OS_CommandHandle *cmd = cls;
1758 const struct GNUNET_SCHEDULER_TaskContext *tc;
1761 GNUNET_OS_LineProcessor proc; 1759 GNUNET_OS_LineProcessor proc;
1762 char *end; 1760 char *end;
1763 ssize_t ret; 1761 ssize_t ret;
1764 1762
1765 cmd->rtask = NULL; 1763 cmd->rtask = NULL;
1764 tc = GNUNET_SCHEDULER_get_task_context ();
1766 if (GNUNET_YES != GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, cmd->r)) 1765 if (GNUNET_YES != GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, cmd->r))
1767 { 1766 {
1768 /* timeout, shutdown, etc. */ 1767 /* timeout, shutdown, etc. */