Changeset 91b60499 in mainline for kernel/generic/src/ipc/kbox.c
- Timestamp:
- 2017-09-30T06:29:42Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 300f4c4
- Parents:
- d076f16 (diff), 6636fb19 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/kbox.c
rd076f16 r91b60499 206 206 * cleanup code. 207 207 * 208 * @return Phone idon success, or negative error code.208 * @return Phone capability handle on success, or negative error code. 209 209 * 210 210 */ … … 236 236 } 237 237 238 int newphid = phone_alloc(TASK); 239 if (newphid < 0) { 240 mutex_unlock(&task->kb.cleanup_lock); 241 return ELIMIT; 242 } 243 238 cap_handle_t phone_handle = phone_alloc(TASK); 239 if (phone_handle < 0) { 240 mutex_unlock(&task->kb.cleanup_lock); 241 return phone_handle; 242 } 243 244 kobject_t *phone_obj = kobject_get(TASK, phone_handle, 245 KOBJECT_TYPE_PHONE); 244 246 /* Connect the newly allocated phone to the kbox */ 245 (void) ipc_phone_connect(&TASK->phones[newphid], &task->kb.box); 247 /* Hand over phone_obj's reference to ipc_phone_connect() */ 248 (void) ipc_phone_connect(phone_obj->phone, &task->kb.box); 246 249 247 250 if (task->kb.thread != NULL) { 248 251 mutex_unlock(&task->kb.cleanup_lock); 249 return newphid;252 return phone_handle; 250 253 } 251 254 … … 263 266 mutex_unlock(&task->kb.cleanup_lock); 264 267 265 return newphid;268 return phone_handle; 266 269 } 267 270
Note:
See TracChangeset
for help on using the changeset viewer.