The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/vmware/vmci/vmci_hashtable.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2018 VMware, Inc.
    3  *
    4  * SPDX-License-Identifier: (BSD-2-Clause OR GPL-2.0)
    5  *
    6  * $FreeBSD$
    7  */
    8 
    9 /* Hash table for use in the APIs. */
   10 
   11 #ifndef _VMCI_HASHTABLE_H_
   12 #define _VMCI_HASHTABLE_H_
   13 
   14 #include "vmci_defs.h"
   15 #include "vmci_kernel_if.h"
   16 
   17 struct vmci_hash_entry {
   18         struct vmci_handle      handle;
   19         int                     ref_count;
   20         struct vmci_hash_entry  *next;
   21 };
   22 
   23 struct vmci_hashtable {
   24         struct vmci_hash_entry  **entries;
   25         /* Number of buckets in above array. */
   26         int                     size;
   27         vmci_lock               lock;
   28 };
   29 
   30 struct  vmci_hashtable *vmci_hashtable_create(int size);
   31 void    vmci_hashtable_destroy(struct vmci_hashtable *table);
   32 void    vmci_hashtable_init_entry(struct vmci_hash_entry *entry,
   33             struct vmci_handle handle);
   34 int     vmci_hashtable_add_entry(struct vmci_hashtable *table,
   35             struct vmci_hash_entry *entry);
   36 int     vmci_hashtable_remove_entry(struct vmci_hashtable *table,
   37             struct vmci_hash_entry *entry);
   38 struct  vmci_hash_entry *vmci_hashtable_get_entry(struct vmci_hashtable *table,
   39             struct vmci_handle handle);
   40 void    vmci_hashtable_hold_entry(struct vmci_hashtable *table,
   41             struct vmci_hash_entry *entry);
   42 int     vmci_hashtable_release_entry(struct vmci_hashtable *table,
   43             struct vmci_hash_entry *entry);
   44 bool    vmci_hashtable_entry_exists(struct vmci_hashtable *table,
   45             struct vmci_handle handle);
   46 void    vmci_hashtable_sync(struct vmci_hashtable *table);
   47 
   48 #endif /* !_VMCI_HASHTABLE_H_ */

Cache object: cef81c0c15c5aaaf354afe0d43baa29e


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.