Changeset ab87db5 in mainline for kernel/generic/src/cap/cap.c
- Timestamp:
- 2019-02-23T17:16:01Z (6 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/cap/cap.c
rbc417660 rab87db5 98 98 { 99 99 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)); 101 101 } 102 102 … … 104 104 { 105 105 cap_handle_t *handle = (cap_handle_t *) key; 106 return hash_mix( CAP_HANDLE_RAW(*handle));106 return hash_mix(cap_handle_raw(*handle)); 107 107 } 108 108 … … 232 232 assert(mutex_locked(&task->cap_info->lock)); 233 233 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)) 236 236 return NULL; 237 237 ht_link_t *link = hash_table_find(&task->cap_info->caps, &handle); … … 383 383 void cap_free(task_t *task, cap_handle_t handle) 384 384 { 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); 387 387 388 388 mutex_lock(&task->cap_info->lock); … … 392 392 393 393 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); 395 395 slab_free(cap_cache, cap); 396 396 mutex_unlock(&task->cap_info->lock);
Note:
See TracChangeset
for help on using the changeset viewer.