VirtualBox

source: vbox/trunk/include/VBox/pdmcommon.h@ 25385

Last change on this file since 25385 was 24730, checked in by vboxsync, 15 years ago

PDM: Implemented making device/driver/usb-device suspend and poweroff notifications asynchronous when needed. Also prepped the way for failing poweron and resume.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/** @file
2 * PDM - Pluggable Device Manager, Common Definitions & Types. (VMM)
3 */
4
5/*
6 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 *
25 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
26 * Clara, CA 95054 USA or visit http://www.sun.com if you need
27 * additional information or have any questions.
28 */
29
30#ifndef ___VBox_pdmcommon_h
31#define ___VBox_pdmcommon_h
32
33/** @defgroup grp_pdm_common Common Definitions & Types
34 * @ingroup grp_pdm
35 *
36 * Not all the types here are "common", they are here to work around header
37 * ordering issues.
38 *
39 * @{
40 */
41
42/** PDM Attach/Detach Callback Flags.
43 * Used by PDMDeviceAttach, PDMDeviceDetach, PDMDriverAttach, PDMDriverDetach,
44 * FNPDMDEVATTACH, FNPDMDEVDETACH, FNPDMDRVATTACH, FNPDMDRVDETACH and
45 * FNPDMDRVCONSTRUCT.
46 @{ */
47/** The attach/detach command is not a hotplug event. */
48#define PDM_TACH_FLAGS_NOT_HOT_PLUG RT_BIT_32(0)
49/* @} */
50
51
52/**
53 * Is asynchronous handling of suspend or power off notification completed?
54 *
55 * This is called to check whether the USB device has quiesced. Don't deadlock.
56 * Avoid blocking. Do NOT wait for anything.
57 *
58 * @returns true if done, false if more work to be done.
59 *
60 * @param pUsbIns The USB device instance.
61 *
62 * @thread EMT(0)
63 */
64typedef DECLCALLBACK(bool) FNPDMUSBASYNCNOTIFY(PPDMUSBINS pUsbIns);
65/** Pointer to a FNPDMUSBASYNCNOTIFY. */
66typedef FNPDMUSBASYNCNOTIFY *PFNPDMUSBASYNCNOTIFY;
67
68/**
69 * Is asynchronous handling of suspend or power off notification completed?
70 *
71 * This is called to check whether the device has quiesced. Don't deadlock.
72 * Avoid blocking. Do NOT wait for anything.
73 *
74 * @returns true if done, false if more work to be done.
75 *
76 * @param pDevIns The device instance.
77 *
78 * @thread EMT(0)
79 */
80typedef DECLCALLBACK(bool) FNPDMDEVASYNCNOTIFY(PPDMDEVINS pDevIns);
81/** Pointer to a FNPDMDEVASYNCNOTIFY. */
82typedef FNPDMDEVASYNCNOTIFY *PFNPDMDEVASYNCNOTIFY;
83
84/**
85 * Is asynchronous handling of suspend or power off notification completed?
86 *
87 * This is called to check whether the driver has quiesced. Don't deadlock.
88 * Avoid blocking. Do NOT wait for anything.
89 *
90 * @returns true if done, false if more work to be done.
91 *
92 * @param pDrvIns The driver instance.
93 *
94 * @thread EMT(0)
95 */
96typedef DECLCALLBACK(bool) FNPDMDRVASYNCNOTIFY(PPDMDRVINS pDrvIns);
97/** Pointer to a FNPDMDRVASYNCNOTIFY. */
98typedef FNPDMDRVASYNCNOTIFY *PFNPDMDRVASYNCNOTIFY;
99
100/** @} */
101
102#endif
103
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette