Changeset 7114d83 in mainline for uspace/srv
- Timestamp:
- 2009-07-06T16:02:27Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d96851
- Parents:
- d68e4d5
- Location:
- uspace/srv/ns
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/ns.c
rd68e4d5 r7114d83 171 171 wait_for_task(id, &call, callid); 172 172 continue; 173 case NS_RETVAL: 174 retval = ns_task_retval(&call); 175 break; 173 176 default: 174 177 retval = ENOENT; -
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 -
uspace/srv/ns/task.h
rd68e4d5 r7114d83 43 43 extern void wait_for_task(task_id_t id, ipc_call_t *call, ipc_callid_t callid); 44 44 45 extern int ns_task_retval(ipc_call_t *call); 46 45 47 #endif 46 48
Note:
See TracChangeset
for help on using the changeset viewer.