mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 00:51:44 +00:00
685a6bf848
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 and no later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 33 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000435.345978407@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* VMware VMCI Driver
|
|
*
|
|
* Copyright (C) 2012 VMware, Inc. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _VMCI_RESOURCE_H_
|
|
#define _VMCI_RESOURCE_H_
|
|
|
|
#include <linux/vmw_vmci_defs.h>
|
|
#include <linux/types.h>
|
|
|
|
#include "vmci_context.h"
|
|
|
|
|
|
enum vmci_resource_type {
|
|
VMCI_RESOURCE_TYPE_ANY,
|
|
VMCI_RESOURCE_TYPE_API,
|
|
VMCI_RESOURCE_TYPE_GROUP,
|
|
VMCI_RESOURCE_TYPE_DATAGRAM,
|
|
VMCI_RESOURCE_TYPE_DOORBELL,
|
|
VMCI_RESOURCE_TYPE_QPAIR_GUEST,
|
|
VMCI_RESOURCE_TYPE_QPAIR_HOST
|
|
};
|
|
|
|
struct vmci_resource {
|
|
struct vmci_handle handle;
|
|
enum vmci_resource_type type;
|
|
struct hlist_node node;
|
|
struct kref kref;
|
|
struct completion done;
|
|
};
|
|
|
|
|
|
int vmci_resource_add(struct vmci_resource *resource,
|
|
enum vmci_resource_type resource_type,
|
|
struct vmci_handle handle);
|
|
|
|
void vmci_resource_remove(struct vmci_resource *resource);
|
|
|
|
struct vmci_resource *
|
|
vmci_resource_by_handle(struct vmci_handle resource_handle,
|
|
enum vmci_resource_type resource_type);
|
|
|
|
struct vmci_resource *vmci_resource_get(struct vmci_resource *resource);
|
|
int vmci_resource_put(struct vmci_resource *resource);
|
|
|
|
struct vmci_handle vmci_resource_handle(struct vmci_resource *resource);
|
|
|
|
#endif /* _VMCI_RESOURCE_H_ */
|