VirtualBox

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

Last change on this file since 28 was 1, checked in by vboxsync, 55 years ago

import

  • 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 InnoTek Systemberatung 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 * If you received this file as part of a commercial VirtualBox
19 * distribution, then only the terms of your commercial VirtualBox
20 * license agreement apply instead of the previous paragraph.
21 */
22
23#ifndef __VBGLINTERNAL__H
24#define __VBGLINTERNAL__H
25
26#if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
27#include <VBox/log.h>
28# define dprintf(a) RTLogBackdoorPrintf a
29#else
30# define dprintf(a) do {} while (0)
31#endif
32
33#include "PhysHeap.h"
34#include "SysHlp.h"
35
36#pragma pack(4)
37
38struct _VBGLPHYSHEAPBLOCK;
39typedef struct _VBGLPHYSHEAPBLOCK VBGLPHYSHEAPBLOCK;
40struct _VBGLPHYSHEAPCHUNK;
41typedef struct _VBGLPHYSHEAPCHUNK VBGLPHYSHEAPCHUNK;
42
43#ifndef VBGL_VBOXGUEST
44struct VBGLHGCMHANDLEDATA
45{
46 uint32_t fAllocated;
47 VBGLDRIVER driver;
48};
49
50typedef struct VBGLHGCMHANDLEDATA *VBGLHGCMHANDLE;
51#endif
52
53enum VbglLibStatus
54{
55 VbglStatusNotInitialized = 0,
56 VbglStatusInitializing,
57 VbglStatusReady
58};
59
60typedef struct _VBGLDATA
61{
62 VbglLibStatus status;
63
64 VBGLIOPORT portVMMDev;
65
66 VMMDevMemory *pVMMDevMemory;
67
68 /**
69 * Physical memory heap data.
70 * @{
71 */
72
73 VBGLPHYSHEAPBLOCK *pFreeBlocksHead;
74 VBGLPHYSHEAPBLOCK *pAllocBlocksHead;
75 VBGLPHYSHEAPCHUNK *pChunkHead;
76
77 RTSEMFASTMUTEX mutexHeap;
78 /** @} */
79
80#ifndef VBGL_VBOXGUEST
81 /**
82 * Fast heap for HGCM handles data.
83 * @{
84 */
85
86 RTSEMFASTMUTEX mutexHGCMHandle;
87
88 struct VBGLHGCMHANDLEDATA aHGCMHandleData[64];
89
90 /** @} */
91#endif
92} VBGLDATA;
93
94#pragma pack()
95
96#ifndef VBGL_DECL_DATA
97extern VBGLDATA g_vbgldata;
98#endif
99
100/* Check if library has been initialized before entering
101 * a public library function.
102 */
103int VbglEnter (void);
104
105#ifdef VBOX_HGCM
106#ifndef VBGL_VBOXGUEST
107/* Initialize HGCM subsystem. */
108int vbglHGCMInit (void);
109/* Terminate HGCM subsystem. */
110int vbglHGCMTerminate (void);
111#endif
112#endif
113
114#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