Changeset 102f641 in mainline for uspace/srv/taskman/event.c
- Timestamp:
- 2019-09-02T19:01:50Z (6 years ago)
- Children:
- 25697163
- Parents:
- 241f1985
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/taskman/event.c
r241f1985 r102f641 167 167 async_answer_1(pr->icall, EINTR, t->exit); 168 168 } else { 169 /* Send both exit status and retval, caller 170 * should know what is valid */ 169 /* 170 * Send both exit status and retval, caller 171 * should know what is valid 172 */ 171 173 async_answer_3(pr->icall, EOK, t->exit, 172 174 t->retval, rest); … … 180 182 } 181 183 182 183 184 list_remove(&pr->link); 184 185 free(pr); … … 233 234 234 235 void wait_for_task(task_id_t id, int flags, ipc_call_t *icall, 235 236 task_id_t waiter_id) 236 237 { 237 238 assert(!(flags & TASK_WAIT_BOTH) || … … 247 248 return; 248 249 } 249 250 250 251 if (t->exit != TASK_EXIT_RUNNING) { 251 252 //TODO are flags BOTH processed correctly here? … … 253 254 return; 254 255 } 255 256 256 257 /* 257 258 * Add request to pending list or reuse existing item for a second … … 274 275 goto finish; 275 276 } 276 277 277 278 link_initialize(&pr->link); 278 279 pr->id = id; … … 305 306 } 306 307 307 308 308 errno_t task_set_retval(task_id_t sender, int retval, bool wait_for_exit) 309 309 { 310 310 errno_t rc = EOK; 311 311 312 312 fibril_rwlock_write_lock(&task_hash_table_lock); 313 313 task_t *t = task_get_by_id(sender); … … 317 317 goto finish; 318 318 } 319 319 320 320 t->retval = retval; 321 321 t->retval_type = wait_for_exit ? RVAL_SET_EXIT : RVAL_SET; 322 322 323 323 event_notify_all(t); 324 324 process_pending_wait(); 325 325 326 326 finish: 327 327 fibril_rwlock_write_unlock(&task_hash_table_lock);
Note:
See TracChangeset
for help on using the changeset viewer.