~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Revision: 49879 $ */
1
2
/** @file
2
 
 *
3
 
 * VBoxGuestLib - A support library for VirtualBox guest additions:
4
 
 * Internal header
 
3
 * VBoxGuestLibR0 - Internal header.
5
4
 */
6
5
 
7
6
/*
20
19
 * additional information or have any questions.
21
20
 */
22
21
 
23
 
#ifndef __VBGLINTERNAL__H
24
 
#define __VBGLINTERNAL__H
 
22
#ifndef ___VBoxGuestLib_VBGLInternal_h
 
23
#define ___VBoxGuestLib_VBGLInternal_h
25
24
 
26
 
/* I have added this include here as
27
 
   a) This file is always included before VBGLInternal and
28
 
   b) It contains a definition for VBGLHGCMHANDLE, so we definitely do not
29
 
      need to redefine that here.  The C (without ++) compiler was complaining
30
 
      that it was defined twice.
31
 
*/
 
25
#include <VBox/VMMDev.h>
 
26
#include <VBox/VBoxGuest.h>
32
27
#include <VBox/VBoxGuestLib.h>
33
28
 
34
29
#include <VBox/log.h>
35
30
 
 
31
 
 
32
#ifdef RT_OS_WINDOWS /** @todo dprintf() -> Log() */
36
33
#if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
37
34
# define dprintf(a) RTLogBackdoorPrintf a
38
35
#else
39
36
# define dprintf(a) do {} while (0)
40
37
#endif
 
38
#else
 
39
# define dprintf(a) Log(a)
 
40
#endif
41
41
 
42
42
#include "SysHlp.h"
43
43
 
44
 
#pragma pack(4)
 
44
#pragma pack(4) /** @todo r=bird: What do we need packing for here? None of these structures are shared between drivers AFAIK. */
45
45
 
46
46
struct _VBGLPHYSHEAPBLOCK;
47
47
typedef struct _VBGLPHYSHEAPBLOCK VBGLPHYSHEAPBLOCK;
63
63
    VbglStatusReady
64
64
};
65
65
 
 
66
/**
 
67
 * Global VBGL ring-0 data.
 
68
 * Lives in VbglR0Init.cpp.
 
69
 */
66
70
typedef struct _VBGLDATA
67
71
{
68
72
    enum VbglLibStatus status;
83
87
    RTSEMFASTMUTEX mutexHeap;
84
88
    /** @} */
85
89
 
 
90
    /**
 
91
     * The host version data.
 
92
     */
 
93
    VMMDevReqHostVersion hostVersion;
 
94
 
 
95
 
86
96
#ifndef VBGL_VBOXGUEST
87
97
    /**
88
98
     * Fast heap for HGCM handles data.
97
107
#endif
98
108
} VBGLDATA;
99
109
 
 
110
 
100
111
#pragma pack()
101
112
 
102
113
#ifndef VBGL_DECL_DATA
103
114
extern VBGLDATA g_vbgldata;
104
115
#endif
105
116
 
106
 
/* Check if library has been initialized before entering
107
 
 * a public library function.
 
117
/**
 
118
 * Internal macro for checking whether we can pass phyical page lists to the
 
119
 * host.
 
120
 *
 
121
 * ASSUMES that vbglR0Enter has been called already.
108
122
 */
109
 
int VbglEnter (void);
 
123
#define VBGLR0_CAN_USE_PHYS_PAGE_LIST() \
 
124
    ( !!(g_vbgldata.hostVersion.features & VMMDEV_HVF_HGCM_PHYS_PAGE_LIST) )
 
125
 
 
126
int vbglR0Enter (void);
110
127
 
111
128
#ifdef VBOX_WITH_HGCM
112
 
#ifndef VBGL_VBOXGUEST
113
 
/* Initialize HGCM subsystem. */
114
 
int vbglHGCMInit (void);
115
 
/* Terminate HGCM subsystem. */
116
 
int vbglHGCMTerminate (void);
117
 
#endif
118
 
#endif
119
 
 
120
 
#endif /* __VBGLINTERNAL__H */
 
129
# ifndef VBGL_VBOXGUEST
 
130
int vbglR0HGCMInit (void);
 
131
int vbglR0HGCMTerminate (void);
 
132
# endif
 
133
#endif /* VBOX_WITH_HGCM */
 
134
 
 
135
#endif /* !___VBoxGuestLib_VBGLInternal_h */
 
136