Ignore:
File:
1 edited

Legend:

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

    r9fc776c7 readaeae8  
    9292{
    9393        cap_t *cap = hash_table_get_inst(item, cap_t, caps_link);
    94         return hash_mix(cap->handle);
     94        return hash_mix(CAP_HANDLE_RAW(cap->handle));
    9595}
    9696
     
    9898{
    9999        cap_handle_t *handle = (cap_handle_t *) key;
    100         return hash_mix(*handle);
     100        return hash_mix(CAP_HANDLE_RAW(*handle));
    101101}
    102102
     
    224224        assert(mutex_locked(&task->cap_info->lock));
    225225
    226         if ((handle < CAPS_START) || (handle > CAPS_LAST))
     226        if ((CAP_HANDLE_RAW(handle) < CAPS_START) ||
     227            (CAP_HANDLE_RAW(handle) > CAPS_LAST))
    227228                return NULL;
    228229        ht_link_t *link = hash_table_find(&task->cap_info->caps, &handle);
     
    329330void cap_free(task_t *task, cap_handle_t handle)
    330331{
    331         assert(handle >= CAPS_START);
    332         assert(handle <= CAPS_LAST);
     332        assert(CAP_HANDLE_RAW(handle) >= CAPS_START);
     333        assert(CAP_HANDLE_RAW(handle) <= CAPS_LAST);
    333334
    334335        mutex_lock(&task->cap_info->lock);
     
    338339
    339340        hash_table_remove_item(&task->cap_info->caps, &cap->caps_link);
    340         ra_free(task->cap_info->handles, handle, 1);
     341        ra_free(task->cap_info->handles, CAP_HANDLE_RAW(handle), 1);
    341342        slab_free(cap_cache, cap);
    342343        mutex_unlock(&task->cap_info->lock);
Note: See TracChangeset for help on using the changeset viewer.