Lines Matching refs:handle

30 static unsigned int vmci_resource_hash(struct vmci_handle handle)  in vmci_resource_hash()  argument
32 return hash_32(handle.resource, VMCI_RESOURCE_HASH_BITS); in vmci_resource_hash()
38 static struct vmci_resource *vmci_resource_lookup(struct vmci_handle handle, in vmci_resource_lookup() argument
42 unsigned int idx = vmci_resource_hash(handle); in vmci_resource_lookup()
47 u32 cid = r->handle.context; in vmci_resource_lookup()
48 u32 rid = r->handle.resource; in vmci_resource_lookup()
51 rid == handle.resource && in vmci_resource_lookup()
52 (cid == handle.context || cid == VMCI_INVALID_ID || in vmci_resource_lookup()
53 handle.context == VMCI_INVALID_ID)) { in vmci_resource_lookup()
81 struct vmci_handle handle; in vmci_resource_find_id() local
90 handle = vmci_make_handle(context_id, current_rid); in vmci_resource_find_id()
91 if (!vmci_resource_lookup(handle, resource_type)) in vmci_resource_find_id()
101 struct vmci_handle handle) in vmci_resource_add() argument
109 if (handle.resource == VMCI_INVALID_ID) { in vmci_resource_add()
110 handle.resource = vmci_resource_find_id(handle.context, in vmci_resource_add()
112 if (handle.resource == VMCI_INVALID_ID) { in vmci_resource_add()
116 } else if (vmci_resource_lookup(handle, resource_type)) { in vmci_resource_add()
121 resource->handle = handle; in vmci_resource_add()
127 idx = vmci_resource_hash(resource->handle); in vmci_resource_add()
139 struct vmci_handle handle = resource->handle; in vmci_resource_remove() local
140 unsigned int idx = vmci_resource_hash(handle); in vmci_resource_remove()
147 if (vmci_handle_is_equal(r->handle, resource->handle)) { in vmci_resource_remove()
220 return resource->handle; in vmci_resource_handle()