Changeset 05ffb41 in mainline for kernel/generic/src/ipc/kbox.c


Ignore:
Timestamp:
2017-08-17T19:11:14Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1c85bae
Parents:
7e3826d9
Message:

Turn IPC phones into kobjects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/kbox.c

    r7e3826d9 r05ffb41  
    206206 * cleanup code.
    207207 *
    208  * @return Phone id on success, or negative error code.
     208 * @return Phone capability on success, or negative error code.
    209209 *
    210210 */
     
    236236        }
    237237       
    238         int newphid = phone_alloc(TASK);
    239         if (newphid < 0) {
     238        int cap = phone_alloc(TASK);
     239        if (cap < 0) {
    240240                mutex_unlock(&task->kb.cleanup_lock);
    241241                return ELIMIT;
     
    243243       
    244244        /* Connect the newly allocated phone to the kbox */
    245         (void) ipc_phone_connect(&TASK->phones[newphid], &task->kb.box);
     245        (void) ipc_phone_connect(phone_get_current(cap), &task->kb.box);
    246246       
    247247        if (task->kb.thread != NULL) {
    248248                mutex_unlock(&task->kb.cleanup_lock);
    249                 return newphid;
     249                return cap;
    250250        }
    251251       
     
    263263        mutex_unlock(&task->kb.cleanup_lock);
    264264       
    265         return newphid;
     265        return cap;
    266266}
    267267
Note: See TracChangeset for help on using the changeset viewer.