Ignore:
File:
1 edited

Legend:

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

    r82d515e9 rb7fd2a0  
    124124 * @param task  Task for which to allocate the info structure.
    125125 */
    126 int caps_task_alloc(task_t *task)
     126errno_t caps_task_alloc(task_t *task)
    127127{
    128128        task->cap_info = (cap_info_t *) malloc(sizeof(cap_info_t),
     
    257257 * @param task  Task for which to allocate the new capability.
    258258 *
    259  * @return New capability handle on success.
    260  * @return Negative error code in case of error.
    261  */
    262 cap_handle_t cap_alloc(task_t *task)
     259 * @param[out] handle  New capability handle on success.
     260 *
     261 * @return An error code in case of error.
     262 */
     263errno_t 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.