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_utils.h
/*- * Copyright (c) 2018 VMware, Inc. * * SPDX-License-Identifier: (BSD-2-Clause OR GPL-2.0) * * $FreeBSD$ */ /* Some common utilities used by the VMCI kernel module. */ #ifndef _VMCI_UTILS_H_ #define _VMCI_UTILS_H_ /* *------------------------------------------------------------------------------ * * vmci_hash_id -- * * Hash function used by the Simple Datagram API. Hashes only a VMCI ID (not * the full VMCI handle). Based on the djb2 hash function by Dan Bernstein. * * Result: * Returns guest call size. * * Side effects: * None. * *------------------------------------------------------------------------------ */ static inline int vmci_hash_id(vmci_id id, unsigned size) { unsigned i; int hash = 5381; for (i = 0; i < sizeof(id); i++) hash = ((hash << 5) + hash) + (uint8_t)(id >> (i * 8)); return (hash & (size - 1)); } #endif /* !_VMCI_UTILS_H_ */
Upload File
Create Folder