Changeset 9dcf472 in mainline
- Timestamp:
- 2019-10-02T10:27:50Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5667dca
- Parents:
- 2443ad8
- git-author:
- Jiri Svoboda <jiri@…> (2019-10-01 18:27:34)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-10-02 10:27:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r2443ad8 r9dcf472 89 89 90 90 static task_id_t task_id; 91 static task_wait_t task_w; 91 92 static bool task_wait_for; 92 93 … … 113 114 errno_t rc; 114 115 115 rc = task_spawnv_debug(&task_id, NULL, cmd_path,116 rc = task_spawnv_debug(&task_id, &task_w, cmd_path, 116 117 (const char *const *)cmd_args, &sess); 117 118 … … 135 136 errno_t rc; 136 137 bool debug_started = false; 138 bool wait_set_up = false; 137 139 138 140 if (sess == NULL) { … … 151 153 152 154 debug_started = true; 155 156 rc = task_setup_wait(task_id, &task_w); 157 if (rc != EOK) { 158 printf("Error setting up wait for task termination.\n"); 159 goto error; 160 } 161 162 wait_set_up = true; 153 163 } 154 164 … … 161 171 return EOK; 162 172 error: 173 if (wait_set_up) 174 task_cancel_wait(&task_w); 163 175 if (debug_started) 164 176 udebug_end(sess); … … 807 819 printf("Waiting for task to exit.\n"); 808 820 809 rc = task_wait _task_id(task_id, &texit, &retval);821 rc = task_wait(&task_w, &texit, &retval); 810 822 if (rc != EOK) { 811 823 printf("Failed waiting for task.\n");
Note:
See TracChangeset
for help on using the changeset viewer.