003 File Manager
Current Path:
/usr/src/sys/dev/vmware/vmci
usr
/
src
/
sys
/
dev
/
vmware
/
vmci
/
📁
..
📄
LICENSE
(2.18 KB)
📄
vmci.c
(27.86 KB)
📄
vmci.h
(1.68 KB)
📄
vmci_call_defs.h
(6.4 KB)
📄
vmci_datagram.c
(15.75 KB)
📄
vmci_datagram.h
(663 B)
📄
vmci_defs.h
(20.7 KB)
📄
vmci_doorbell.c
(23.37 KB)
📄
vmci_doorbell.h
(722 B)
📄
vmci_driver.c
(12.07 KB)
📄
vmci_driver.h
(1.13 KB)
📄
vmci_event.c
(16.33 KB)
📄
vmci_event.h
(473 B)
📄
vmci_hashtable.c
(12.45 KB)
📄
vmci_hashtable.h
(1.37 KB)
📄
vmci_kernel_api.h
(392 B)
📄
vmci_kernel_api_1.h
(2.67 KB)
📄
vmci_kernel_api_2.h
(874 B)
📄
vmci_kernel_defs.h
(678 B)
📄
vmci_kernel_if.c
(23.83 KB)
📄
vmci_kernel_if.h
(3.04 KB)
📄
vmci_qpair.c
(22.26 KB)
📄
vmci_queue.h
(4.39 KB)
📄
vmci_queue_pair.c
(24.95 KB)
📄
vmci_queue_pair.h
(791 B)
📄
vmci_resource.c
(8.87 KB)
📄
vmci_resource.h
(1.63 KB)
📄
vmci_utils.h
(909 B)
Editing: vmci_resource.h
/*- * Copyright (c) 2018 VMware, Inc. * * SPDX-License-Identifier: (BSD-2-Clause OR GPL-2.0) * * $FreeBSD$ */ /* VMCI Resource Access Control API. */ #ifndef _VMCI_RESOURCE_H_ #define _VMCI_RESOURCE_H_ #include "vmci_defs.h" #include "vmci_hashtable.h" #include "vmci_kernel_if.h" #define RESOURCE_CONTAINER(ptr, type, member) \ ((type *)((char *)(ptr) - offsetof(type, member))) typedef void(*vmci_resource_free_cb)(void *resource); typedef enum { VMCI_RESOURCE_TYPE_ANY, VMCI_RESOURCE_TYPE_API, VMCI_RESOURCE_TYPE_GROUP, VMCI_RESOURCE_TYPE_DATAGRAM, VMCI_RESOURCE_TYPE_DOORBELL, } vmci_resource_type; struct vmci_resource { struct vmci_hash_entry hash_entry; vmci_resource_type type; /* Callback to free container object when refCount is 0. */ vmci_resource_free_cb container_free_cb; /* Container object reference. */ void *container_object; }; int vmci_resource_init(void); void vmci_resource_exit(void); void vmci_resource_sync(void); vmci_id vmci_resource_get_id(vmci_id context_id); int vmci_resource_add(struct vmci_resource *resource, vmci_resource_type resource_type, struct vmci_handle resource_handle, vmci_resource_free_cb container_free_cb, void *container_object); void vmci_resource_remove(struct vmci_handle resource_handle, vmci_resource_type resource_type); struct vmci_resource *vmci_resource_get(struct vmci_handle resource_handle, vmci_resource_type resource_type); void vmci_resource_hold(struct vmci_resource *resource); int vmci_resource_release(struct vmci_resource *resource); struct vmci_handle vmci_resource_handle(struct vmci_resource *resource); #endif /* !_VMCI_RESOURCE_H_ */
Upload File
Create Folder