Changes in kernel/generic/src/cap/cap.c [eadaeae8:9fc776c7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/cap/cap.c
readaeae8 r9fc776c7 92 92 { 93 93 cap_t *cap = hash_table_get_inst(item, cap_t, caps_link); 94 return hash_mix( CAP_HANDLE_RAW(cap->handle));94 return hash_mix(cap->handle); 95 95 } 96 96 … … 98 98 { 99 99 cap_handle_t *handle = (cap_handle_t *) key; 100 return hash_mix( CAP_HANDLE_RAW(*handle));100 return hash_mix(*handle); 101 101 } 102 102 … … 224 224 assert(mutex_locked(&task->cap_info->lock)); 225 225 226 if ((CAP_HANDLE_RAW(handle) < CAPS_START) || 227 (CAP_HANDLE_RAW(handle) > CAPS_LAST)) 226 if ((handle < CAPS_START) || (handle > CAPS_LAST)) 228 227 return NULL; 229 228 ht_link_t *link = hash_table_find(&task->cap_info->caps, &handle); … … 330 329 void cap_free(task_t *task, cap_handle_t handle) 331 330 { 332 assert( CAP_HANDLE_RAW(handle)>= CAPS_START);333 assert( CAP_HANDLE_RAW(handle)<= CAPS_LAST);331 assert(handle >= CAPS_START); 332 assert(handle <= CAPS_LAST); 334 333 335 334 mutex_lock(&task->cap_info->lock); … … 339 338 340 339 hash_table_remove_item(&task->cap_info->caps, &cap->caps_link); 341 ra_free(task->cap_info->handles, CAP_HANDLE_RAW(handle), 1);340 ra_free(task->cap_info->handles, handle, 1); 342 341 slab_free(cap_cache, cap); 343 342 mutex_unlock(&task->cap_info->lock);
Note:
See TracChangeset
for help on using the changeset viewer.