Changeset 7114d83 in mainline for uspace/srv/ns/task.c
- Timestamp:
- 2009-07-06T16:02:27Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d96851
- Parents:
- d68e4d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/task.c
rd68e4d5 r7114d83 64 64 link_t link; 65 65 task_id_t id; /**< Task ID. */ 66 int retval; 66 67 bool destroyed; 67 68 } hashed_task_t; … … 174 175 175 176 if (!(pr->callid & IPC_CALLID_NOTIFICATION)) 176 ipc_answer_ 0(pr->callid, EOK);177 ipc_answer_1(pr->callid, EOK, ht->retval); 177 178 178 179 hash_table_remove(&task_hash_table, keys, 2); … … 222 223 ht->id = id; 223 224 ht->destroyed = (et == TASK_CREATE) ? false : true; 225 ht->retval = -1; 224 226 hash_table_insert(&task_hash_table, keys, &ht->link); 225 227 } else { … … 262 264 out: 263 265 if (!(callid & IPC_CALLID_NOTIFICATION)) 264 ipc_answer_0(callid, retval); 266 ipc_answer_1(callid, retval, ht->retval); 267 } 268 269 int ns_task_retval(ipc_call_t *call) 270 { 271 task_id_t id; 272 unsigned long keys[2]; 273 274 id = MERGE_LOUP32(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call)); 275 276 keys[0] = LOWER32(id); 277 keys[1] = UPPER32(id); 278 279 link_t *link = hash_table_find(&task_hash_table, keys); 280 hashed_task_t *ht = (link != NULL) ? 281 hash_table_get_instance(link, hashed_task_t, link) : NULL; 282 283 if ((ht == NULL) || ht->destroyed) 284 return EINVAL; 285 286 ht->retval = IPC_GET_ARG3(*call); 287 288 return EOK; 265 289 } 266 290
Note:
See TracChangeset
for help on using the changeset viewer.