Changeset 4ef6645 in mainline
- Timestamp:
- 2009-05-23T09:51:37Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 493853ec
- Parents:
- 16d17ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
r16d17ca r4ef6645 356 356 GET_CHECK_PHONE(cloned_phone, IPC_GET_ARG1(call->data), 357 357 return ENOENT); 358 if (phone == cloned_phone)359 return EEXISTS;360 358 if (cloned_phone < phone) { 361 359 mutex_lock(&cloned_phone->lock); 362 360 mutex_lock(&phone->lock); 361 } else if (cloned_phone > phone) { 362 mutex_lock(&phone->lock); 363 mutex_lock(&cloned_phone->lock); 363 364 } else { 364 365 mutex_lock(&phone->lock); 365 mutex_lock(&cloned_phone->lock);366 366 } 367 367 if ((cloned_phone->state != IPC_PHONE_CONNECTED) || 368 368 phone->state != IPC_PHONE_CONNECTED) { 369 mutex_unlock(&cloned_phone->lock); 369 if (cloned_phone != phone) 370 mutex_unlock(&cloned_phone->lock); 370 371 mutex_unlock(&phone->lock); 371 372 return EINVAL; … … 379 380 newphid = phone_alloc(phone->callee->task); 380 381 if (newphid < 0) { 381 mutex_unlock(&cloned_phone->lock); 382 if (cloned_phone != phone) 383 mutex_unlock(&cloned_phone->lock); 382 384 mutex_unlock(&phone->lock); 383 385 return ELIMIT; … … 385 387 ipc_phone_connect(&phone->callee->task->phones[newphid], 386 388 cloned_phone->callee); 387 mutex_unlock(&cloned_phone->lock); 389 if (cloned_phone != phone) 390 mutex_unlock(&cloned_phone->lock); 388 391 mutex_unlock(&phone->lock); 389 392 /* Set the new phone for the callee. */
Note:
See TracChangeset
for help on using the changeset viewer.