VirtualBox

source: vbox/trunk/include/VBox/pdmins.h@ 7637

Last change on this file since 7637 was 6287, checked in by vboxsync, 17 years ago

doxygen: Missing close.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1/** @file
2 * PDM - Pluggable Device Manager, Common Instance Macros.
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
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
26#ifndef ___VBox_pdmins_h
27#define ___VBox_pdmins_h
28
29/** @defgroup grp_pdm_ins Common Instance Macros
30 * @ingroup grp_pdm
31 * @{
32 */
33
34/** @def PDMBOTHCBDECL
35 * Macro for declaring a callback which is static in HC and exported in GC.
36 */
37#if defined(IN_GC) || defined(IN_RING0)
38# define PDMBOTHCBDECL(type) DECLEXPORT(type)
39#else
40# define PDMBOTHCBDECL(type) static type
41#endif
42
43/** @def PDMINS_2_DATA
44 * Converts a PDM Device, USB Device, or Driver instance pointer to a pointer to the instance data.
45 */
46#define PDMINS_2_DATA(pIns, type) ( (type)(void *)&(pIns)->achInstanceData[0] )
47
48/** @def PDMINS2DATA
49 * Converts a PDM Device, USB Device, or Driver instance pointer to a pointer to the instance data.
50 * @deprecated Use PDMINS_2_DATA.
51 */
52#define PDMINS2DATA(pIns, type) PDMINS_2_DATA(pIns, type)
53
54/** @def PDMINS2DATA_GCPTR
55 * Converts a PDM Device, USB Device, or Driver instance pointer to a GC pointer to the instance data.
56 */
57#define PDMINS_2_DATA_GCPTR(pIns) ( (pIns)->pvInstanceDataGC )
58
59/** @def PDMINS2DATA_GCPTR
60 * Converts a PDM Device, USB Device, or Driver instance pointer to a GC pointer to the instance data.
61 * @deprecated Use PDMINS_2_DATA_GCPTR.
62 */
63#define PDMINS2DATA_GCPTR(pIns) PDMINS_2_DATA_GCPTR(pIns)
64
65/** @def PDMINS2DATA_R3PTR
66 * Converts a PDM Device, USB Device, or Driver instance pointer to a HC pointer to the instance data.
67 */
68#define PDMINS_2_DATA_R3PTR(pIns) ( (pIns)->pvInstanceDataR3 )
69
70/** @def PDMINS2DATA_R3PTR
71 * Converts a PDM Device, USB Device, or Driver instance pointer to a HC pointer to the instance data.
72 * @deprecated Use PDMINS_2_DATA_R3PTR
73 */
74#define PDMINS2DATA_R3PTR(pIns) PDMINS_2_DATA_R3PTR(pIns)
75
76/** @def PDMINS2DATA_R0PTR
77 * Converts a PDM Device, USB Device, or Driver instance pointer to a R0 pointer to the instance data.
78 */
79#define PDMINS_2_DATA_R0PTR(pIns) ( (pIns)->pvInstanceDataR0 )
80
81/** @def PDMINS2DATA_R0PTR
82 * Converts a PDM Device, USB Device, or Driver instance pointer to a R0 pointer to the instance data.
83 * @deprecated Use PDMINS_2_DATA_R0PTR
84 */
85#define PDMINS2DATA_R0PTR(pIns) PDMINS_2_DATA_R0PTR(pIns)
86
87/** @} */
88
89#endif
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