VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h@ 4968

Last change on this file since 4968 was 4071, checked in by vboxsync, 17 years ago

Biggest check-in ever. New source code headers for all (C) innotek files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/** @file
2 *
3 * VBoxGuestLib - A support library for VirtualBox guest additions:
4 * Internal header
5 */
6
7/*
8 * Copyright (C) 2006-2007 innotek GmbH
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License as published by the Free Software Foundation,
14 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
15 * distribution. VirtualBox OSE is distributed in the hope that it will
16 * be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef __VBGLINTERNAL__H
20#define __VBGLINTERNAL__H
21
22/* I have added this include here as
23 a) This file is always included before VBGLInternal and
24 b) It contains a definition for VBGLHGCMHANDLE, so we definitely do not
25 need to redefine that here. The C (without ++) compiler was complaining
26 that it was defined twice.
27*/
28#include <VBox/VBoxGuestLib.h>
29
30#if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
31#include <VBox/log.h>
32# define dprintf(a) RTLogBackdoorPrintf a
33#else
34# define dprintf(a) do {} while (0)
35#endif
36
37#include "SysHlp.h"
38
39#pragma pack(4)
40
41struct _VBGLPHYSHEAPBLOCK;
42typedef struct _VBGLPHYSHEAPBLOCK VBGLPHYSHEAPBLOCK;
43struct _VBGLPHYSHEAPCHUNK;
44typedef struct _VBGLPHYSHEAPCHUNK VBGLPHYSHEAPCHUNK;
45
46#ifndef VBGL_VBOXGUEST
47struct VBGLHGCMHANDLEDATA
48{
49 uint32_t fAllocated;
50 VBGLDRIVER driver;
51};
52#endif
53
54enum VbglLibStatus
55{
56 VbglStatusNotInitialized = 0,
57 VbglStatusInitializing,
58 VbglStatusReady
59};
60
61typedef struct _VBGLDATA
62{
63 enum VbglLibStatus status;
64
65 VBGLIOPORT portVMMDev;
66
67 VMMDevMemory *pVMMDevMemory;
68
69 /**
70 * Physical memory heap data.
71 * @{
72 */
73
74 VBGLPHYSHEAPBLOCK *pFreeBlocksHead;
75 VBGLPHYSHEAPBLOCK *pAllocBlocksHead;
76 VBGLPHYSHEAPCHUNK *pChunkHead;
77
78 RTSEMFASTMUTEX mutexHeap;
79 /** @} */
80
81#ifndef VBGL_VBOXGUEST
82 /**
83 * Fast heap for HGCM handles data.
84 * @{
85 */
86
87 RTSEMFASTMUTEX mutexHGCMHandle;
88
89 struct VBGLHGCMHANDLEDATA aHGCMHandleData[64];
90
91 /** @} */
92#endif
93} VBGLDATA;
94
95#pragma pack()
96
97#ifndef VBGL_DECL_DATA
98extern VBGLDATA g_vbgldata;
99#endif
100
101/* Check if library has been initialized before entering
102 * a public library function.
103 */
104int VbglEnter (void);
105
106#ifdef VBOX_HGCM
107#ifndef VBGL_VBOXGUEST
108/* Initialize HGCM subsystem. */
109int vbglHGCMInit (void);
110/* Terminate HGCM subsystem. */
111int vbglHGCMTerminate (void);
112#endif
113#endif
114
115#endif /* __VBGLINTERNAL__H */
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