Changeset 09d01f2 in mainline for kernel/generic/src/cap/cap.c


Ignore:
Timestamp:
2017-12-18T17:40:52Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2024096, 23d4515
Parents:
6a32cc5f
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-18 15:39:01)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-18 17:40:52)
Message:

Return phones/capabilities separately from error codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/cap/cap.c

    r6a32cc5f r09d01f2  
    257257 * @param task  Task for which to allocate the new capability.
    258258 *
    259  * @return New capability handle on success.
     259 * @param[out] handle  New capability handle on success.
     260 *
    260261 * @return Negative error code in case of error.
    261262 */
    262 cap_handle_t cap_alloc(task_t *task)
     263int cap_alloc(task_t *task, cap_handle_t *handle)
    263264{
    264265        cap_t *cap = NULL;
    265         cap_handle_t handle;
    266266
    267267        /*
     
    293293
    294294        cap->state = CAP_STATE_ALLOCATED;
    295         handle = cap->handle;
    296         mutex_unlock(&task->cap_info->lock);
    297 
    298         return handle;
     295        *handle = cap->handle;
     296        mutex_unlock(&task->cap_info->lock);
     297
     298        return EOK;
    299299}
    300300
Note: See TracChangeset for help on using the changeset viewer.