Changeset ab87db5 in mainline for kernel/generic/src/cap/cap.c


Ignore:
Timestamp:
2019-02-23T17:16:01Z (5 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c193d83, ca0e838
Parents:
bc417660 (diff), 95a47b0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-23 17:16:01)
git-committer:
GitHub <noreply@…> (2019-02-23 17:16:01)
Message:

Merge pull request #157

Turn some function-like macros into functions

File:
1 edited

Legend:

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

    rbc417660 rab87db5  
    9898{
    9999        cap_t *cap = hash_table_get_inst(item, cap_t, caps_link);
    100         return hash_mix(CAP_HANDLE_RAW(cap->handle));
     100        return hash_mix(cap_handle_raw(cap->handle));
    101101}
    102102
     
    104104{
    105105        cap_handle_t *handle = (cap_handle_t *) key;
    106         return hash_mix(CAP_HANDLE_RAW(*handle));
     106        return hash_mix(cap_handle_raw(*handle));
    107107}
    108108
     
    232232        assert(mutex_locked(&task->cap_info->lock));
    233233
    234         if ((CAP_HANDLE_RAW(handle) < CAPS_START) ||
    235             (CAP_HANDLE_RAW(handle) > CAPS_LAST))
     234        if ((cap_handle_raw(handle) < CAPS_START) ||
     235            (cap_handle_raw(handle) > CAPS_LAST))
    236236                return NULL;
    237237        ht_link_t *link = hash_table_find(&task->cap_info->caps, &handle);
     
    383383void cap_free(task_t *task, cap_handle_t handle)
    384384{
    385         assert(CAP_HANDLE_RAW(handle) >= CAPS_START);
    386         assert(CAP_HANDLE_RAW(handle) <= CAPS_LAST);
     385        assert(cap_handle_raw(handle) >= CAPS_START);
     386        assert(cap_handle_raw(handle) <= CAPS_LAST);
    387387
    388388        mutex_lock(&task->cap_info->lock);
     
    392392
    393393        hash_table_remove_item(&task->cap_info->caps, &cap->caps_link);
    394         ra_free(task->cap_info->handles, CAP_HANDLE_RAW(handle), 1);
     394        ra_free(task->cap_info->handles, cap_handle_raw(handle), 1);
    395395        slab_free(cap_cache, cap);
    396396        mutex_unlock(&task->cap_info->lock);
Note: See TracChangeset for help on using the changeset viewer.