VirtualBox

source: vbox/trunk/include/VBox/cdefs.h@ 12021

Last change on this file since 12021 was 11814, checked in by vboxsync, 16 years ago

Initial commit of the NetFlt driver for Windows

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 39.7 KB
Line 
1/** @file
2 * VirtualBox - Common C and C++ definition.
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_cdefs_h
31#define ___VBox_cdefs_h
32
33#include <iprt/cdefs.h>
34
35
36/** @def VBOX_WITH_STATISTICS
37 * When defined all statistics will be included in the build.
38 * This is enabled by default in all debug builds.
39 */
40#ifndef VBOX_WITH_STATISTICS
41# ifdef DEBUG
42# define VBOX_WITH_STATISTICS
43# endif
44#endif
45
46/** @def VBOX_STRICT
47 * Alias for RT_STRICT.
48 */
49#ifdef RT_STRICT
50# ifndef VBOX_STRICT
51# define VBOX_STRICT
52# endif
53#endif
54
55
56/*
57 * Shut up DOXYGEN warnings and guide it properly thru the code.
58 */
59#ifdef __DOXYGEN__
60#define VBOX_WITH_STATISTICS
61#ifndef VBOX_STRICT
62# define VBOX_STRICT
63#endif
64#define IN_CFGM_GC
65#define IN_CFGM_R3
66#define IN_CPUM_GC
67#define IN_CPUM_R0
68#define IN_CPUM_R3
69#define IN_CSAM_R0
70#define IN_CSAM_R3
71#define IN_CSAM_GC
72#define IN_DBGF_R0
73#define IN_DBGF_R3
74#define IN_DBGF_GC
75#define IN_DIS_GC
76#define IN_DIS_R0
77#define IN_DIS_R3
78#define IN_EM_GC
79#define IN_EM_R3
80#define IN_EM_R0
81#define IN_HWACCM_R0
82#define IN_HWACCM_R3
83#define IN_HWACCM_GC
84#define IN_IDE_R3
85#define IN_INTNET_R0
86#define IN_INTNET_R3
87#define IN_IOM_GC
88#define IN_IOM_R3
89#define IN_IOM_R0
90#define IN_MM_GC
91#define IN_MM_R0
92#define IN_MM_R3
93#define IN_PATM_R0
94#define IN_PATM_R3
95#define IN_PATM_GC
96#define IN_PDM_GC
97#define IN_PDM_R3
98#define IN_PGM_GC
99#define IN_PGM_R0
100#define IN_PGM_R3
101#define IN_REM_GC
102#define IN_REM_R0
103#define IN_REM_R3
104#define IN_SELM_GC
105#define IN_SELM_R0
106#define IN_SELM_R3
107#define IN_SSM_R3
108#define IN_STAM_GC
109#define IN_STAM_R0
110#define IN_STAM_R3
111#define IN_SUP_R0
112#define IN_SUP_R3
113#define IN_SUP_GC
114#define IN_TM_GC
115#define IN_TM_R0
116#define IN_TM_R3
117#define IN_TRPM_GC
118#define IN_TRPM_R0
119#define IN_TRPM_R3
120#define IN_USB_GC
121#define IN_USB_R0
122#define IN_USB_R3
123#define IN_USBLIB
124#define IN_VGADEVICE_GC
125#define IN_VGADEVICE_R3
126#define IN_VHHD_R3
127#define IN_VM_GC
128#define IN_VM_R0
129#define IN_VM_R3
130#define IN_VMM_GC
131#define IN_VMM_R0
132#define IN_VMM_R3
133/** @todo fixme */
134#endif
135
136
137
138
139/** @def VBOXCALL
140 * The standard calling convention for VBOX interfaces.
141 */
142#define VBOXCALL RTCALL
143
144
145
146/** @def IN_VM_R3
147 * Used to indicate whether we're inside the same link module as the ring 3 part of the
148 * virtual machine (the module) or not.
149 */
150/** @def VMR3DECL
151 * Ring 3 VM export or import declaration.
152 * @param type The return type of the function declaration.
153 */
154#ifdef IN_VM_R3
155# define VMR3DECL(type) DECLEXPORT(type) VBOXCALL
156#else
157# define VMR3DECL(type) DECLIMPORT(type) VBOXCALL
158#endif
159
160/** @def IN_VM_R0
161 * Used to indicate whether we're inside the same link module as the ring 0
162 * part of the virtual machine (the module) or not.
163 */
164/** @def VMR0DECL
165 * Ring 0 VM export or import declaration.
166 * @param type The return type of the function declaration.
167 */
168#ifdef IN_VM_R0
169# define VMR0DECL(type) DECLEXPORT(type) VBOXCALL
170#else
171# define VMR0DECL(type) DECLIMPORT(type) VBOXCALL
172#endif
173
174/** @def IN_VM_GC
175 * Used to indicate whether we're inside the same link module as the guest context
176 * part of the virtual machine (the module) or not.
177 */
178/** @def VMGCDECL
179 * Guest context VM export or import declaration.
180 * @param type The return type of the function declaration.
181 */
182#ifdef IN_VM_GC
183# define VMGCDECL(type) DECLEXPORT(type) VBOXCALL
184#else
185# define VMGCDECL(type) DECLIMPORT(type) VBOXCALL
186#endif
187
188/** @def VMDECL
189 * VM export or import declaration.
190 * @param type The return type of the function declaration.
191 */
192#if defined(IN_VM_R3) || defined(IN_VM_R0) || defined(IN_VM_GC)
193# define VMDECL(type) DECLEXPORT(type) VBOXCALL
194#else
195# define VMDECL(type) DECLIMPORT(type) VBOXCALL
196#endif
197
198
199/** @def IN_VMM_R3
200 * Used to indicate whether we're inside the same link module as the ring 3 part of the
201 * virtual machine monitor or not.
202 */
203/** @def VMMR3DECL
204 * Ring 3 VMM export or import declaration.
205 * @param type The return type of the function declaration.
206 */
207#ifdef IN_VMM_R3
208# define VMMR3DECL(type) DECLEXPORT(type) VBOXCALL
209#else
210# define VMMR3DECL(type) DECLIMPORT(type) VBOXCALL
211#endif
212
213/** @def IN_VMM_R0
214 * Used to indicate whether we're inside the same link module as the ring 0 part of the
215 * virtual machine monitor or not.
216 */
217/** @def VMMR0DECL
218 * Ring 0 VMM export or import declaration.
219 * @param type The return type of the function declaration.
220 */
221#ifdef IN_VMM_R0
222# define VMMR0DECL(type) DECLEXPORT(type) VBOXCALL
223#else
224# define VMMR0DECL(type) DECLIMPORT(type) VBOXCALL
225#endif
226
227/** @def IN_VMM_GC
228 * Used to indicate whether we're inside the same link module as the guest context
229 * part of the virtual machine monitor or not.
230 */
231/** @def VMMGCDECL
232 * Guest context VMM export or import declaration.
233 * @param type The return type of the function declaration.
234 */
235#ifdef IN_VMM_GC
236# define VMMGCDECL(type) DECLEXPORT(type) VBOXCALL
237#else
238# define VMMGCDECL(type) DECLIMPORT(type) VBOXCALL
239#endif
240
241/** @def VMMDECL
242 * VMM export or import declaration.
243 * @param type The return type of the function declaration.
244 */
245#if defined(IN_VMM_R3) || defined(IN_VMM_R0) || defined(IN_VMM_GC)
246# define VMMDECL(type) DECLEXPORT(type) VBOXCALL
247#else
248# define VMMDECL(type) DECLIMPORT(type) VBOXCALL
249#endif
250
251
252/** @def IN_DIS_R3
253 * Used to indicate whether we're inside the same link module as the
254 * Ring-3 disassembler or not.
255 */
256/** @def DISR3DECL(type)
257 * Disassembly export or import declaration.
258 * @param type The return type of the function declaration.
259 */
260#ifdef IN_DIS_R3
261# define DISR3DECL(type) DECLEXPORT(type) VBOXCALL
262#else
263# define DISR3DECL(type) DECLIMPORT(type) VBOXCALL
264#endif
265
266/** @def IN_DIS_R0
267 * Used to indicate whether we're inside the same link module as the
268 * Ring-0 disassembler or not.
269 */
270/** @def DISR0DECL(type)
271 * Disassembly export or import declaration.
272 * @param type The return type of the function declaration.
273 */
274#ifdef IN_DIS_R0
275# define DISR0DECL(type) DECLEXPORT(type) VBOXCALL
276#else
277# define DISR0DECL(type) DECLIMPORT(type) VBOXCALL
278#endif
279
280/** @def IN_DIS_GC
281 * Used to indicate whether we're inside the same link module as the
282 * GC disassembler or not.
283 */
284/** @def DISGCDECL(type)
285 * Disassembly export or import declaration.
286 * @param type The return type of the function declaration.
287 */
288#ifdef IN_DIS_GC
289# define DISGCDECL(type) DECLEXPORT(type) VBOXCALL
290#else
291# define DISGCDECL(type) DECLIMPORT(type) VBOXCALL
292#endif
293
294/** @def DISDECL(type)
295 * Disassembly export or import declaration.
296 * @param type The return type of the function declaration.
297 */
298#if defined(IN_DIS_R3) ||defined(IN_DIS_R0) || defined(IN_DIS_GC)
299# define DISDECL(type) DECLEXPORT(type) VBOXCALL
300#else
301# define DISDECL(type) DECLIMPORT(type) VBOXCALL
302#endif
303
304
305/** @def IN_SUP_R3
306 * Used to indicate whether we're inside the same link module as the Ring 3 Support Library or not.
307 */
308/** @def SUPR3DECL(type)
309 * Support library export or import declaration.
310 * @param type The return type of the function declaration.
311 */
312#ifdef IN_SUP_R3
313# define SUPR3DECL(type) DECLEXPORT(type) VBOXCALL
314#else
315# define SUPR3DECL(type) DECLIMPORT(type) VBOXCALL
316#endif
317
318/** @def IN_SUP_R0
319 * Used to indicate whether we're inside the same link module as the Ring 0 Support Library or not.
320 */
321/** @def SUPR0DECL(type)
322 * Support library export or import declaration.
323 * @param type The return type of the function declaration.
324 */
325#ifdef IN_SUP_R0
326# ifdef IN_SUP_STATIC
327# define SUPR0DECL(type) DECLHIDDEN(type) VBOXCALL
328# else
329# define SUPR0DECL(type) DECLEXPORT(type) VBOXCALL
330# endif
331#else
332# ifdef IN_SUP_STATIC
333# define SUPR0DECL(type) DECLHIDDEN(type) VBOXCALL
334# else
335# define SUPR0DECL(type) DECLIMPORT(type) VBOXCALL
336# endif
337#endif
338
339/** @def IN_SUP_GC
340 * Used to indicate whether we're inside the same link module as the GC Support Library or not.
341 */
342/** @def SUPGCDECL(type)
343 * Support library export or import declaration.
344 * @param type The return type of the function declaration.
345 */
346#ifdef IN_SUP_GC
347# define SUPGCDECL(type) DECLEXPORT(type) VBOXCALL
348#else
349# define SUPGCDECL(type) DECLIMPORT(type) VBOXCALL
350#endif
351
352/** @def IN_SUP_R0
353 * Used to indicate whether we're inside the same link module as the Ring 0 Support Library or not.
354 */
355/** @def SUPR0DECL(type)
356 * Support library export or import declaration.
357 * @param type The return type of the function declaration.
358 */
359#if defined(IN_SUP_R0) || defined(IN_SUP_R3) || defined(IN_SUP_GC)
360# define SUPDECL(type) DECLEXPORT(type) VBOXCALL
361#else
362# define SUPDECL(type) DECLIMPORT(type) VBOXCALL
363#endif
364
365
366
367
368/** @def IN_PDM_R3
369 * Used to indicate whether we're inside the same link module as the Ring 3
370 * Pluggable Device Manager.
371 */
372/** @def PDMR3DECL(type)
373 * Pluggable Device Manager export or import declaration.
374 * @param type The return type of the function declaration.
375 */
376#ifdef IN_PDM_R3
377# define PDMR3DECL(type) DECLEXPORT(type) VBOXCALL
378#else
379# define PDMR3DECL(type) DECLIMPORT(type) VBOXCALL
380#endif
381
382/** @def IN_PDM_GC
383 * Used to indicate whether we're inside the same link module as the GC
384 * Pluggable Device Manager.
385 */
386/** @def PDMGCDECL(type)
387 * Pluggable Device Manager export or import declaration.
388 * @param type The return type of the function declaration.
389 */
390#ifdef IN_PDM_GC
391# define PDMGCDECL(type) DECLEXPORT(type) VBOXCALL
392#else
393# define PDMGCDECL(type) DECLIMPORT(type) VBOXCALL
394#endif
395
396/** @def PDMDECL(type)
397 * Pluggable Device Manager export or import declaration.
398 * Functions declared using this macro exists in all contexts.
399 * @param type The return type of the function declaration.
400 */
401#if defined(IN_PDM_R3) || defined(IN_PDM_GC) || defined(IN_PDM_R0)
402# define PDMDECL(type) DECLEXPORT(type) VBOXCALL
403#else
404# define PDMDECL(type) DECLIMPORT(type) VBOXCALL
405#endif
406
407
408
409
410/** @def IN_CFGM_R3
411 * Used to indicate whether we're inside the same link module as the Ring 3
412 * Configuration Manager.
413 */
414/** @def CFGMR3DECL(type)
415 * Configuration Manager export or import declaration.
416 * @param type The return type of the function declaration.
417 */
418#ifdef IN_CFGM_R3
419# define CFGMR3DECL(type) DECLEXPORT(type) VBOXCALL
420#else
421# define CFGMR3DECL(type) DECLIMPORT(type) VBOXCALL
422#endif
423
424/** @def IN_CFGM_GC
425 * Used to indicate whether we're inside the same link module as the GC
426 * Configuration Manager.
427 */
428/** @def CFGMGCDECL(type)
429 * Configuration Manager export or import declaration.
430 * @param type The return type of the function declaration.
431 */
432#ifdef IN_CFGM_GC
433# define CFGMGCDECL(type) DECLEXPORT(type) VBOXCALL
434#else
435# define CFGMGCDECL(type) DECLIMPORT(type) VBOXCALL
436#endif
437
438
439/** @def IN_CPUM_R0
440 * Used to indicate whether we're inside the same link module as
441 * the HC Ring-0 CPU Monitor(/Manager).
442 */
443/** @def CPUMR0DECL(type)
444 * CPU Monitor(/Manager) HC Ring-0 export or import declaration.
445 * @param type The return type of the function declaration.
446 */
447#ifdef IN_CPUM_R0
448# define CPUMR0DECL(type) DECLEXPORT(type) VBOXCALL
449#else
450# define CPUMR0DECL(type) DECLIMPORT(type) VBOXCALL
451#endif
452
453/** @def IN_CPUM_R3
454 * Used to indicate whether we're inside the same link module as
455 * the HC Ring-3 CPU Monitor(/Manager).
456 */
457/** @def CPUMR3DECL(type)
458 * CPU Monitor(/Manager) HC Ring-3 export or import declaration.
459 * @param type The return type of the function declaration.
460 */
461#ifdef IN_CPUM_R3
462# define CPUMR3DECL(type) DECLEXPORT(type) VBOXCALL
463#else
464# define CPUMR3DECL(type) DECLIMPORT(type) VBOXCALL
465#endif
466
467/** @def IN_CPUM_GC
468 * Used to indicate whether we're inside the same link module as
469 * the GC CPU Monitor(/Manager).
470 */
471/** @def CPUMGCDECL(type)
472 * CPU Monitor(/Manager) HC Ring-3 export or import declaration.
473 * @param type The return type of the function declaration.
474 */
475#ifdef IN_CPUM_GC
476# define CPUMGCDECL(type) DECLEXPORT(type) VBOXCALL
477#else
478# define CPUMGCDECL(type) DECLIMPORT(type) VBOXCALL
479#endif
480
481/** @def CPUMDECL(type)
482 * CPU Monitor(/Manager) export or import declaration.
483 * Functions declared using this macro exists in all contexts.
484 * @param type The return type of the function declaration.
485 */
486#if defined(IN_CPUM_R3) || defined(IN_CPUM_GC) || defined(IN_CPUM_R0)
487# define CPUMDECL(type) DECLEXPORT(type) VBOXCALL
488#else
489# define CPUMDECL(type) DECLIMPORT(type) VBOXCALL
490#endif
491
492
493
494/** @def IN_PATM_R0
495 * Used to indicate whether we're inside the same link module as
496 * the HC Ring-0 CPU Monitor(/Manager).
497 */
498/** @def PATMR0DECL(type)
499 * Patch Manager HC Ring-0 export or import declaration.
500 * @param type The return type of the function declaration.
501 */
502#ifdef IN_PATM_R0
503# define PATMR0DECL(type) DECLEXPORT(type) VBOXCALL
504#else
505# define PATMR0DECL(type) DECLIMPORT(type) VBOXCALL
506#endif
507
508/** @def IN_PATM_R3
509 * Used to indicate whether we're inside the same link module as
510 * the HC Ring-3 CPU Monitor(/Manager).
511 */
512/** @def PATMR3DECL(type)
513 * Patch Manager HC Ring-3 export or import declaration.
514 * @param type The return type of the function declaration.
515 */
516#ifdef IN_PATM_R3
517# define PATMR3DECL(type) DECLEXPORT(type) VBOXCALL
518#else
519# define PATMR3DECL(type) DECLIMPORT(type) VBOXCALL
520#endif
521
522/** @def IN_PATM_GC
523 * Used to indicate whether we're inside the same link module as
524 * the GC Patch Manager.
525 */
526/** @def PATMGCDECL(type)
527 * Patch Manager HC Ring-3 export or import declaration.
528 * @param type The return type of the function declaration.
529 */
530#ifdef IN_PATM_GC
531# define PATMGCDECL(type) DECLEXPORT(type) VBOXCALL
532#else
533# define PATMGCDECL(type) DECLIMPORT(type) VBOXCALL
534#endif
535
536/** @def PATMDECL(type)
537 * Patch Manager all contexts export or import declaration.
538 * @param type The return type of the function declaration.
539 */
540#if defined(IN_PATM_R3) || defined(IN_PATM_R0) || defined(IN_PATM_GC)
541# define PATMDECL(type) DECLEXPORT(type) VBOXCALL
542#else
543# define PATMDECL(type) DECLIMPORT(type) VBOXCALL
544#endif
545
546
547
548/** @def IN_CSAM_R0
549 * Used to indicate whether we're inside the same link module as
550 * the HC Ring-0 CPU Monitor(/Manager).
551 */
552/** @def CSAMR0DECL(type)
553 * Code Scanning and Analysis Manager HC Ring-0 export or import declaration.
554 * @param type The return type of the function declaration.
555 */
556#ifdef IN_CSAM_R0
557# define CSAMR0DECL(type) DECLEXPORT(type) VBOXCALL
558#else
559# define CSAMR0DECL(type) DECLIMPORT(type) VBOXCALL
560#endif
561
562/** @def IN_CSAM_R3
563 * Used to indicate whether we're inside the same link module as
564 * the HC Ring-3 CPU Monitor(/Manager).
565 */
566/** @def CSAMR3DECL(type)
567 * Code Scanning and Analysis Manager HC Ring-3 export or import declaration.
568 * @param type The return type of the function declaration.
569 */
570#ifdef IN_CSAM_R3
571# define CSAMR3DECL(type) DECLEXPORT(type) VBOXCALL
572#else
573# define CSAMR3DECL(type) DECLIMPORT(type) VBOXCALL
574#endif
575
576/** @def IN_CSAM_GC
577 * Used to indicate whether we're inside the same link module as
578 * the GC Code Scanning and Analysis Manager.
579 */
580/** @def CSAMGCDECL(type)
581 * Code Scanning and Analysis Manager HC Ring-3 export or import declaration.
582 * @param type The return type of the function declaration.
583 */
584#ifdef IN_CSAM_GC
585# define CSAMGCDECL(type) DECLEXPORT(type) VBOXCALL
586#else
587# define CSAMGCDECL(type) DECLIMPORT(type) VBOXCALL
588#endif
589
590/** @def CSAMDECL(type)
591 * Code Scanning and Analysis Manager export or import declaration.
592 * Functions declared using this macro exists in all contexts.
593 * @param type The return type of the function declaration.
594 */
595#if defined(IN_CSAM_R3) || defined(IN_CSAM_GC) || defined(IN_CSAM_R0)
596# define CSAMDECL(type) DECLEXPORT(type) VBOXCALL
597#else
598# define CSAMDECL(type) DECLIMPORT(type) VBOXCALL
599#endif
600
601
602
603/** @def IN_MM_R0
604 * Used to indicate whether we're inside the same link module as
605 * the HC Ring-0 Memory Monitor(/Manager).
606 */
607/** @def MMR0DECL(type)
608 * Memory Monitor(/Manager) HC Ring-0 export or import declaration.
609 * @param type The return type of the function declaration.
610 */
611#ifdef IN_MM_R0
612# define MMR0DECL(type) DECLEXPORT(type) VBOXCALL
613#else
614# define MMR0DECL(type) DECLIMPORT(type) VBOXCALL
615#endif
616
617/** @def IN_MM_R3
618 * Used to indicate whether we're inside the same link module as
619 * the HC Ring-3 Memory Monitor(/Manager).
620 */
621/** @def MMR3DECL(type)
622 * Memory Monitor(/Manager) HC Ring-3 export or import declaration.
623 * @param type The return type of the function declaration.
624 */
625#ifdef IN_MM_R3
626# define MMR3DECL(type) DECLEXPORT(type) VBOXCALL
627#else
628# define MMR3DECL(type) DECLIMPORT(type) VBOXCALL
629#endif
630
631/** @def IN_MM_GC
632 * Used to indicate whether we're inside the same link module as
633 * the GC Memory Monitor(/Manager).
634 */
635/** @def MMGCDECL(type)
636 * Memory Monitor(/Manager) HC Ring-3 export or import declaration.
637 * @param type The return type of the function declaration.
638 */
639#ifdef IN_MM_GC
640# define MMGCDECL(type) DECLEXPORT(type) VBOXCALL
641#else
642# define MMGCDECL(type) DECLIMPORT(type) VBOXCALL
643#endif
644
645/** @def MMDECL(type)
646 * Memory Monitor(/Manager) export or import declaration.
647 * Functions declared using this macro exists in all contexts.
648 * @param type The return type of the function declaration.
649 */
650#if defined(IN_MM_R3) || defined(IN_MM_GC) || defined(IN_MM_R0)
651# define MMDECL(type) DECLEXPORT(type) VBOXCALL
652#else
653# define MMDECL(type) DECLIMPORT(type) VBOXCALL
654#endif
655
656
657
658
659/** @def IN_SELM_R0
660 * Used to indicate whether we're inside the same link module as
661 * the HC Ring-0 Selector Monitor(/Manager).
662 */
663/** @def SELMR0DECL(type)
664 * Selector Monitor(/Manager) HC Ring-0 export or import declaration.
665 * @param type The return type of the function declaration.
666 */
667#ifdef IN_SELM_R0
668# define SELMR0DECL(type) DECLEXPORT(type) VBOXCALL
669#else
670# define SELMR0DECL(type) DECLIMPORT(type) VBOXCALL
671#endif
672
673/** @def IN_SELM_R3
674 * Used to indicate whether we're inside the same link module as
675 * the HC Ring-3 Selector Monitor(/Manager).
676 */
677/** @def SELMR3DECL(type)
678 * Selector Monitor(/Manager) HC Ring-3 export or import declaration.
679 * @param type The return type of the function declaration.
680 */
681#ifdef IN_SELM_R3
682# define SELMR3DECL(type) DECLEXPORT(type) VBOXCALL
683#else
684# define SELMR3DECL(type) DECLIMPORT(type) VBOXCALL
685#endif
686
687/** @def IN_SELM_GC
688 * Used to indicate whether we're inside the same link module as
689 * the GC Selector Monitor(/Manager).
690 */
691/** @def SELMGCDECL(type)
692 * Selector Monitor(/Manager) HC Ring-3 export or import declaration.
693 * @param type The return type of the function declaration.
694 */
695#ifdef IN_SELM_GC
696# define SELMGCDECL(type) DECLEXPORT(type) VBOXCALL
697#else
698# define SELMGCDECL(type) DECLIMPORT(type) VBOXCALL
699#endif
700
701/** @def SELMDECL(type)
702 * Selector Monitor(/Manager) export or import declaration.
703 * Functions declared using this macro exists in all contexts.
704 * @param type The return type of the function declaration.
705 */
706#if defined(IN_SELM_R3) || defined(IN_SELM_GC) || defined(IN_SELM_R0)
707# define SELMDECL(type) DECLEXPORT(type) VBOXCALL
708#else
709# define SELMDECL(type) DECLIMPORT(type) VBOXCALL
710#endif
711
712
713
714/** @def IN_HWACCM_R0
715 * Used to indicate whether we're inside the same link module as
716 * the HC Ring-0 VMX Monitor(/Manager).
717 */
718/** @def HWACCMR0DECL(type)
719 * Selector Monitor(/Manager) HC Ring-0 export or import declaration.
720 * @param type The return type of the function declaration.
721 */
722#ifdef IN_HWACCM_R0
723# define HWACCMR0DECL(type) DECLEXPORT(type) VBOXCALL
724#else
725# define HWACCMR0DECL(type) DECLIMPORT(type) VBOXCALL
726#endif
727
728/** @def IN_HWACCM_R3
729 * Used to indicate whether we're inside the same link module as
730 * the HC Ring-3 VMX Monitor(/Manager).
731 */
732/** @def HWACCMR3DECL(type)
733 * Selector Monitor(/Manager) HC Ring-3 export or import declaration.
734 * @param type The return type of the function declaration.
735 */
736#ifdef IN_HWACCM_R3
737# define HWACCMR3DECL(type) DECLEXPORT(type) VBOXCALL
738#else
739# define HWACCMR3DECL(type) DECLIMPORT(type) VBOXCALL
740#endif
741
742/** @def IN_HWACCM_GC
743 * Used to indicate whether we're inside the same link module as
744 * the GC VMX Monitor(/Manager).
745 */
746/** @def HWACCMGCDECL(type)
747 * Selector Monitor(/Manager) HC Ring-3 export or import declaration.
748 * @param type The return type of the function declaration.
749 */
750#ifdef IN_HWACCM_GC
751# define HWACCMGCDECL(type) DECLEXPORT(type) VBOXCALL
752#else
753# define HWACCMGCDECL(type) DECLIMPORT(type) VBOXCALL
754#endif
755
756/** @def HWACCMDECL(type)
757 * VMX Monitor(/Manager) export or import declaration.
758 * Functions declared using this macro exists in all contexts.
759 * @param type The return type of the function declaration.
760 */
761#if defined(IN_HWACCM_R3) || defined(IN_HWACCM_GC) || defined(IN_HWACCM_R0)
762# define HWACCMDECL(type) DECLEXPORT(type) VBOXCALL
763#else
764# define HWACCMDECL(type) DECLIMPORT(type) VBOXCALL
765#endif
766
767
768
769/** @def IN_TM_R0
770 * Used to indicate whether we're inside the same link module as
771 * the HC Ring-0 Time Manager.
772 */
773/** @def TMR0DECL(type)
774 * Time Manager HC Ring-0 export or import declaration.
775 * @param type The return type of the function declaration.
776 */
777#ifdef IN_TM_R0
778# define TMR0DECL(type) DECLEXPORT(type) VBOXCALL
779#else
780# define TMR0DECL(type) DECLIMPORT(type) VBOXCALL
781#endif
782
783/** @def IN_TM_R3
784 * Used to indicate whether we're inside the same link module as
785 * the HC Ring-3 Time Manager.
786 */
787/** @def TMR3DECL(type)
788 * Time Manager HC Ring-3 export or import declaration.
789 * @param type The return type of the function declaration.
790 */
791#ifdef IN_TM_R3
792# define TMR3DECL(type) DECLEXPORT(type) VBOXCALL
793#else
794# define TMR3DECL(type) DECLIMPORT(type) VBOXCALL
795#endif
796
797/** @def IN_TM_GC
798 * Used to indicate whether we're inside the same link module as
799 * the GC Time Manager.
800 */
801/** @def TMGCDECL(type)
802 * Time Manager HC Ring-3 export or import declaration.
803 * @param type The return type of the function declaration.
804 */
805#ifdef IN_TM_GC
806# define TMGCDECL(type) DECLEXPORT(type) VBOXCALL
807#else
808# define TMGCDECL(type) DECLIMPORT(type) VBOXCALL
809#endif
810
811/** @def TMDECL(type)
812 * Time Manager export or import declaration.
813 * Functions declared using this macro exists in all contexts.
814 * @param type The return type of the function declaration.
815 */
816#if defined(IN_TM_R3) || defined(IN_TM_GC) || defined(IN_TM_R0)
817# define TMDECL(type) DECLEXPORT(type) VBOXCALL
818#else
819# define TMDECL(type) DECLIMPORT(type) VBOXCALL
820#endif
821
822
823
824
825/** @def IN_TRPM_R0
826 * Used to indicate whether we're inside the same link module as
827 * the HC Ring-0 Trap Monitor.
828 */
829/** @def TRPMR0DECL(type)
830 * Trap Monitor HC Ring-0 export or import declaration.
831 * @param type The return type of the function declaration.
832 */
833#ifdef IN_TRPM_R0
834# define TRPMR0DECL(type) DECLEXPORT(type) VBOXCALL
835#else
836# define TRPMR0DECL(type) DECLIMPORT(type) VBOXCALL
837#endif
838
839/** @def IN_TRPM_R3
840 * Used to indicate whether we're inside the same link module as
841 * the HC Ring-3 Trap Monitor.
842 */
843/** @def TRPMR3DECL(type)
844 * Trap Monitor HC Ring-3 export or import declaration.
845 * @param type The return type of the function declaration.
846 */
847#ifdef IN_TRPM_R3
848# define TRPMR3DECL(type) DECLEXPORT(type) VBOXCALL
849#else
850# define TRPMR3DECL(type) DECLIMPORT(type) VBOXCALL
851#endif
852
853/** @def IN_TRPM_GC
854 * Used to indicate whether we're inside the same link module as
855 * the GC Trap Monitor.
856 */
857/** @def TRPMGCDECL(type)
858 * Trap Monitor GC export or import declaration.
859 * @param type The return type of the function declaration.
860 */
861#ifdef IN_TRPM_GC
862# define TRPMGCDECL(type) DECLEXPORT(type) VBOXCALL
863#else
864# define TRPMGCDECL(type) DECLIMPORT(type) VBOXCALL
865#endif
866
867/** @def TRPMDECL(type)
868 * Trap Monitor export or import declaration.
869 * Functions declared using this macro exists in all contexts.
870 * @param type The return type of the function declaration.
871 */
872#if defined(IN_TRPM_R3) || defined(IN_TRPM_GC) || defined(IN_TRPM_R0)
873# define TRPMDECL(type) DECLEXPORT(type) VBOXCALL
874#else
875# define TRPMDECL(type) DECLIMPORT(type) VBOXCALL
876#endif
877
878
879
880
881/** @def IN_USB_R0
882 * Used to indicate whether we're inside the same link module as
883 * the HC Ring-0 USB device / service.
884 */
885/** @def USBR0DECL(type)
886 * USB device / service HC Ring-0 export or import declaration.
887 * @param type The return type of the function declaration.
888 */
889#ifdef IN_USB_R0
890# define USBR0DECL(type) DECLEXPORT(type) VBOXCALL
891#else
892# define USBR0DECL(type) DECLIMPORT(type) VBOXCALL
893#endif
894
895/** @def IN_USB_R3
896 * Used to indicate whether we're inside the same link module as
897 * the HC Ring-3 USB device / service.
898 */
899/** @def USBR3DECL(type)
900 * USB device / services HC Ring-3 export or import declaration.
901 * @param type The return type of the function declaration.
902 */
903#ifdef IN_USB_R3
904# define USBR3DECL(type) DECLEXPORT(type) VBOXCALL
905#else
906# define USBR3DECL(type) DECLIMPORT(type) VBOXCALL
907#endif
908
909/** @def IN_USB_GC
910 * Used to indicate whether we're inside the same link module as
911 * the GC USB device.
912 */
913/** @def USBGCDECL(type)
914 * USB device GC export or import declaration.
915 * @param type The return type of the function declaration.
916 */
917#ifdef IN_USB_GC
918# define USBGCDECL(type) DECLEXPORT(type) VBOXCALL
919#else
920# define USBGCDECL(type) DECLIMPORT(type) VBOXCALL
921#endif
922
923/** @def USBDECL(type)
924 * Trap Monitor export or import declaration.
925 * Functions declared using this macro exists in all contexts.
926 * @param type The return type of the function declaration.
927 */
928#if defined(IN_USB_R3) || defined(IN_USB_GC) || defined(IN_USB_R0)
929# define USBDECL(type) DECLEXPORT(type) VBOXCALL
930#else
931# define USBDECL(type) DECLIMPORT(type) VBOXCALL
932#endif
933
934
935
936/** @def IN_USBLIB
937 * Used to indicate whether we're inside the same link module as the USBLib.
938 */
939/** @def USBLIB_DECL
940 * USBLIB export or import declaration.
941 * @param type The return type of the function declaration.
942 */
943#ifdef IN_RING0
944# define USBLIB_DECL(type) type VBOXCALL
945#elif defined(IN_USBLIB)
946# define USBLIB_DECL(type) DECLEXPORT(type) VBOXCALL
947#else
948# define USBLIB_DECL(type) DECLIMPORT(type) VBOXCALL
949#endif
950
951
952
953/** @def IN_INTNET_R3
954 * Used to indicate whether we're inside the same link module as the Ring 3
955 * Internal Networking Service.
956 */
957/** @def INTNETR3DECL(type)
958 * Internal Networking Service export or import declaration.
959 * @param type The return type of the function declaration.
960 */
961#ifdef IN_INTNET_R3
962# define INTNETR3DECL(type) DECLEXPORT(type) VBOXCALL
963#else
964# define INTNETR3DECL(type) DECLIMPORT(type) VBOXCALL
965#endif
966
967/** @def IN_INTNET_R0
968 * Used to indicate whether we're inside the same link module as the R0
969 * Internal Network Service.
970 */
971/** @def INTNETR0DECL(type)
972 * Internal Networking Service export or import declaration.
973 * @param type The return type of the function declaration.
974 */
975#ifdef IN_INTNET_R0
976# define INTNETR0DECL(type) DECLEXPORT(type) VBOXCALL
977#else
978# define INTNETR0DECL(type) DECLIMPORT(type) VBOXCALL
979#endif
980
981
982
983/** @def IN_IOM_R3
984 * Used to indicate whether we're inside the same link module as the Ring 3
985 * Input/Output Monitor.
986 */
987/** @def IOMR3DECL(type)
988 * Input/Output Monitor export or import declaration.
989 * @param type The return type of the function declaration.
990 */
991#ifdef IN_IOM_R3
992# define IOMR3DECL(type) DECLEXPORT(type) VBOXCALL
993#else
994# define IOMR3DECL(type) DECLIMPORT(type) VBOXCALL
995#endif
996
997/** @def IN_IOM_GC
998 * Used to indicate whether we're inside the same link module as the GC
999 * Input/Output Monitor.
1000 */
1001/** @def IOMGCDECL(type)
1002 * Input/Output Monitor export or import declaration.
1003 * @param type The return type of the function declaration.
1004 */
1005#ifdef IN_IOM_GC
1006# define IOMGCDECL(type) DECLEXPORT(type) VBOXCALL
1007#else
1008# define IOMGCDECL(type) DECLIMPORT(type) VBOXCALL
1009#endif
1010
1011/** @def IN_IOM_R0
1012 * Used to indicate whether we're inside the same link module as the R0
1013 * Input/Output Monitor.
1014 */
1015/** @def IOMR0DECL(type)
1016 * Input/Output Monitor export or import declaration.
1017 * @param type The return type of the function declaration.
1018 */
1019#ifdef IN_IOM_R0
1020# define IOMR0DECL(type) DECLEXPORT(type) VBOXCALL
1021#else
1022# define IOMR0DECL(type) DECLIMPORT(type) VBOXCALL
1023#endif
1024
1025/** @def IOMDECL(type)
1026 * Input/Output Monitor export or import declaration.
1027 * Functions declared using this macro exists in all contexts.
1028 * @param type The return type of the function declaration.
1029 */
1030#if defined(IN_IOM_R3) || defined(IN_IOM_GC) || defined(IN_IOM_R0)
1031# define IOMDECL(type) DECLEXPORT(type) VBOXCALL
1032#else
1033# define IOMDECL(type) DECLIMPORT(type) VBOXCALL
1034#endif
1035
1036
1037/** @def IN_VGADEVICE_R3
1038 * Used to indicate whether we're inside the same link module as
1039 * the HC Ring-3 VGA Monitor(/Manager).
1040 */
1041/** @def VGAR3DECL(type)
1042 * VGA Monitor(/Manager) HC Ring-3 export or import declaration.
1043 * @param type The return type of the function declaration.
1044 */
1045#ifdef IN_VGADEVICE_R3
1046# define VGAR3DECL(type) DECLEXPORT(type) VBOXCALL
1047#else
1048# define VGAR3DECL(type) DECLIMPORT(type) VBOXCALL
1049#endif
1050
1051/** @def IN_VGADEVICE_GC
1052 * Used to indicate whether we're inside the same link module as
1053 * the GC VGA Monitor(/Manager).
1054 */
1055/** @def VGAGCDECL(type)
1056 * VGA Monitor(/Manager) HC Ring-3 export or import declaration.
1057 * @param type The return type of the function declaration.
1058 */
1059#ifdef IN_VGADEVICE_GC
1060# define VGAGCDECL(type) DECLEXPORT(type) VBOXCALL
1061#else
1062# define VGAGCDECL(type) DECLIMPORT(type) VBOXCALL
1063#endif
1064
1065/** @def VGADECL(type)
1066 * VGA Monitor(/Manager) export or import declaration.
1067 * Functions declared using this macro exists in all contexts.
1068 * @param type The return type of the function declaration.
1069 */
1070#if defined(IN_VGADEVICE_R3) || defined(IN_VGADEVICE_GC)
1071# define VGADECL(type) DECLEXPORT(type) VBOXCALL
1072#else
1073# define VGADECL(type) DECLIMPORT(type) VBOXCALL
1074#endif
1075
1076
1077/** @def IN_PGM_R3
1078 * Used to indicate whether we're inside the same link module as the Ring 3
1079 * Page Monitor and Manager.
1080 */
1081/** @def PGMR3DECL(type)
1082 * Page Monitor and Manager export or import declaration.
1083 * @param type The return type of the function declaration.
1084 */
1085#ifdef IN_PGM_R3
1086# define PGMR3DECL(type) DECLEXPORT(type) VBOXCALL
1087#else
1088# define PGMR3DECL(type) DECLIMPORT(type) VBOXCALL
1089#endif
1090
1091/** @def IN_PGM_GC
1092 * Used to indicate whether we're inside the same link module as the GC
1093 * Page Monitor and Manager.
1094 */
1095/** @def PGMGCDECL(type)
1096 * Page Monitor and Manager export or import declaration.
1097 * @param type The return type of the function declaration.
1098 */
1099#ifdef IN_PGM_GC
1100# define PGMGCDECL(type) DECLEXPORT(type) VBOXCALL
1101#else
1102# define PGMGCDECL(type) DECLIMPORT(type) VBOXCALL
1103#endif
1104
1105/** @def IN_PGM_R0
1106 * Used to indicate whether we're inside the same link module as the R0
1107 * Page Monitor and Manager.
1108 */
1109/** @def PGMR0DECL(type)
1110 * Page Monitor and Manager export or import declaration.
1111 * @param type The return type of the function declaration.
1112 */
1113#ifdef IN_PGM_R0
1114# define PGMR0DECL(type) DECLEXPORT(type) VBOXCALL
1115#else
1116# define PGMR0DECL(type) DECLIMPORT(type) VBOXCALL
1117#endif
1118
1119/** @def PGMDECL(type)
1120 * Page Monitor and Manager export or import declaration.
1121 * @param type The return type of the function declaration.
1122 */
1123#if defined(IN_PGM_R3) || defined(IN_PGM_R0) || defined(IN_PGM_GC)
1124# define PGMDECL(type) DECLEXPORT(type) VBOXCALL
1125#else
1126# define PGMDECL(type) DECLIMPORT(type) VBOXCALL
1127#endif
1128
1129
1130/** @def IN_DBGF_R3
1131 * Used to indicate whether we're inside the same link module as the Ring 3
1132 * Debugging Facility.
1133 */
1134/** @def DBGFR3DECL(type)
1135 * R3 Debugging Facility export or import declaration.
1136 * @param type The return type of the function declaration.
1137 */
1138#ifdef IN_DBGF_R3
1139# define DBGFR3DECL(type) DECLEXPORT(type) VBOXCALL
1140#else
1141# define DBGFR3DECL(type) DECLIMPORT(type) VBOXCALL
1142#endif
1143
1144/** @def IN_DBGF_R0
1145 * Used to indicate whether we're inside the same link module as the Ring 0
1146 * Debugging Facility.
1147 */
1148/** @def DBGFR0DECL(type)
1149 * R0 Debugging Facility export or import declaration.
1150 * @param type The return type of the function declaration.
1151 */
1152#ifdef IN_DBGF_R0
1153# define DBGFR0DECL(type) DECLEXPORT(type) VBOXCALL
1154#else
1155# define DBGFR0DECL(type) DECLIMPORT(type) VBOXCALL
1156#endif
1157
1158/** @def IN_DBGF_GC
1159 * Used to indicate whether we're inside the same link module as the GC
1160 * Debugging Facility.
1161 */
1162/** @def DBGFGCDECL(type)
1163 * GC Debugging Facility export or import declaration.
1164 * @param type The return type of the function declaration.
1165 */
1166#ifdef IN_DBGF_GC
1167# define DBGFGCDECL(type) DECLEXPORT(type) VBOXCALL
1168#else
1169# define DBGFGCDECL(type) DECLIMPORT(type) VBOXCALL
1170#endif
1171
1172/** @def DBGFGCDECL(type)
1173 * Debugging Facility export or import declaration.
1174 * @param type The return type of the function declaration.
1175 */
1176#if defined(IN_DBGF_R3) || defined(IN_DBGF_R0) || defined(IN_DBGF_GC)
1177# define DBGFDECL(type) DECLEXPORT(type) VBOXCALL
1178#else
1179# define DBGFDECL(type) DECLIMPORT(type) VBOXCALL
1180#endif
1181
1182
1183
1184/** @def IN_SSM_R3
1185 * Used to indicate whether we're inside the same link module as the Ring 3
1186 * Saved State Manager.
1187 */
1188/** @def SSMR3DECL(type)
1189 * R3 Saved State export or import declaration.
1190 * @param type The return type of the function declaration.
1191 */
1192#ifdef IN_SSM_R3
1193# define SSMR3DECL(type) DECLEXPORT(type) VBOXCALL
1194#else
1195# define SSMR3DECL(type) DECLIMPORT(type) VBOXCALL
1196#endif
1197
1198
1199
1200/** @def IN_STAM_R3
1201 * Used to indicate whether we're inside the same link module as the Ring 3
1202 * Statistics Manager.
1203 */
1204/** @def STAMR3DECL(type)
1205 * R3 Statistics Manager export or import declaration.
1206 * @param type The return type of the function declaration.
1207 */
1208#ifdef IN_STAM_R3
1209# define STAMR3DECL(type) DECLEXPORT(type) VBOXCALL
1210#else
1211# define STAMR3DECL(type) DECLIMPORT(type) VBOXCALL
1212#endif
1213
1214/** @def IN_STAM_R0
1215 * Used to indicate whether we're inside the same link module as the Ring 0
1216 * Statistics Manager.
1217 */
1218/** @def STAMR0DECL(type)
1219 * R0 Statistics Manager export or import declaration.
1220 * @param type The return type of the function declaration.
1221 */
1222#ifdef IN_STAM_R0
1223# define STAMR0DECL(type) DECLEXPORT(type) VBOXCALL
1224#else
1225# define STAMR0DECL(type) DECLIMPORT(type) VBOXCALL
1226#endif
1227
1228/** @def IN_STAM_GC
1229 * Used to indicate whether we're inside the same link module as the GC
1230 * Statistics Manager.
1231 */
1232/** @def STAMGCDECL(type)
1233 * GC Statistics Manager export or import declaration.
1234 * @param type The return type of the function declaration.
1235 */
1236#ifdef IN_STAM_GC
1237# define STAMGCDECL(type) DECLEXPORT(type) VBOXCALL
1238#else
1239# define STAMGCDECL(type) DECLIMPORT(type) VBOXCALL
1240#endif
1241
1242/** @def STAMGCDECL(type)
1243 * Debugging Facility export or import declaration.
1244 * @param type The return type of the function declaration.
1245 */
1246#if defined(IN_STAM_R3) || defined(IN_STAM_R0) || defined(IN_STAM_GC)
1247# define STAMDECL(type) DECLEXPORT(type) VBOXCALL
1248#else
1249# define STAMDECL(type) DECLIMPORT(type) VBOXCALL
1250#endif
1251
1252
1253
1254/** @def IN_EM_R3
1255 * Used to indicate whether we're inside the same link module as the Ring 3
1256 * Execution Monitor.
1257 */
1258/** @def EMR3DECL(type)
1259 * Execution Monitor export or import declaration.
1260 * @param type The return type of the function declaration.
1261 */
1262#ifdef IN_EM_R3
1263# define EMR3DECL(type) DECLEXPORT(type) VBOXCALL
1264#else
1265# define EMR3DECL(type) DECLIMPORT(type) VBOXCALL
1266#endif
1267
1268/** @def IN_EM_GC
1269 * Used to indicate whether we're inside the same link module as the GC
1270 * Execution Monitor.
1271 */
1272/** @def EMGCDECL(type)
1273 * Execution Monitor export or import declaration.
1274 * @param type The return type of the function declaration.
1275 */
1276#ifdef IN_EM_GC
1277# define EMGCDECL(type) DECLEXPORT(type) VBOXCALL
1278#else
1279# define EMGCDECL(type) DECLIMPORT(type) VBOXCALL
1280#endif
1281
1282
1283/** @def EMDECL(type)
1284 * Execution Monitor export or import declaration.
1285 * @param type The return type of the function declaration.
1286 */
1287#if defined(IN_EM_R3) || defined(IN_EM_GC) || defined(IN_EM_R0)
1288# define EMDECL(type) DECLEXPORT(type) VBOXCALL
1289#else
1290# define EMDECL(type) DECLIMPORT(type) VBOXCALL
1291#endif
1292
1293
1294/** @def IN_IDE_R3
1295 * Used to indicate whether we're inside the same link module as the Ring 3
1296 * IDE device.
1297 */
1298/** @def IDER3DECL(type)
1299 * Ring-3 IDE device export or import declaration.
1300 * @param type The return type of the function declaration.
1301 */
1302#ifdef IN_IDE_R3
1303# define IDER3DECL(type) DECLEXPORT(type) VBOXCALL
1304#else
1305# define IDER3DECL(type) DECLIMPORT(type) VBOXCALL
1306#endif
1307
1308
1309/** @def IN_VBOXDDU
1310 * Used to indicate whether we're inside the VBoxDDU shared object.
1311 */
1312/** @def VBOXDDU_DECL(type)
1313 * VBoxDDU export or import (ring-3).
1314 * @param type The return type of the function declaration.
1315 */
1316#ifdef IN_VBOXDDU
1317# define VBOXDDU_DECL(type) DECLEXPORT(type) VBOXCALL
1318#else
1319# define VBOXDDU_DECL(type) DECLIMPORT(type) VBOXCALL
1320#endif
1321
1322
1323
1324/** @def IN_REM_R0
1325 * Used to indicate whether we're inside the same link module as
1326 * the HC Ring-0 Recompiled Execution Manager.
1327 */
1328/** @def REMR0DECL(type)
1329 * Recompiled Execution Manager HC Ring-0 export or import declaration.
1330 * @param type The return type of the function declaration.
1331 */
1332#ifdef IN_REM_R0
1333# define REMR0DECL(type) DECLEXPORT(type) VBOXCALL
1334#else
1335# define REMR0DECL(type) DECLIMPORT(type) VBOXCALL
1336#endif
1337
1338/** @def IN_RT_R3
1339 * Used to indicate whether we're inside the same link module as
1340 * the HC Ring-3 Recompiled Execution Manager.
1341 */
1342/** @def RTR3DECL(type)
1343 * Recompiled Execution Manager HC Ring-3 export or import declaration.
1344 * @param type The return type of the function declaration.
1345 */
1346#ifdef IN_REM_R3
1347# define REMR3DECL(type) DECLEXPORT(type) VBOXCALL
1348#else
1349# define REMR3DECL(type) DECLIMPORT(type) VBOXCALL
1350#endif
1351
1352/** @def IN_REM_GC
1353 * Used to indicate whether we're inside the same link module as
1354 * the GC Recompiled Execution Manager.
1355 */
1356/** @def REMGCDECL(type)
1357 * Recompiled Execution Manager HC Ring-3 export or import declaration.
1358 * @param type The return type of the function declaration.
1359 */
1360#ifdef IN_REM_GC
1361# define REMGCDECL(type) DECLEXPORT(type) VBOXCALL
1362#else
1363# define REMGCDECL(type) DECLIMPORT(type) VBOXCALL
1364#endif
1365
1366/** @def REMDECL(type)
1367 * Recompiled Execution Manager export or import declaration.
1368 * Functions declared using this macro exists in all contexts.
1369 * @param type The return type of the function declaration.
1370 */
1371#if defined(IN_REM_R3) || defined(IN_REM_GC) || defined(IN_REM_R0)
1372# define REMDECL(type) DECLEXPORT(type) VBOXCALL
1373#else
1374# define REMDECL(type) DECLIMPORT(type) VBOXCALL
1375#endif
1376
1377
1378
1379
1380/** @def DBGDECL(type)
1381 * Debugger module export or import declaration.
1382 * Functions declared using this exists only in R3 since the
1383 * debugger modules is R3 only.
1384 * @param type The return type of the function declaration.
1385 */
1386#if defined(IN_DBG_R3) || defined(IN_DBG)
1387# define DBGDECL(type) DECLEXPORT(type) VBOXCALL
1388#else
1389# define DBGDECL(type) DECLIMPORT(type) VBOXCALL
1390#endif
1391
1392
1393/** @def NoDmik(expr)
1394 * Turns the given expression into NOOP when DEBUG_dmik is defined. Evaluates
1395 * the expression normally otherwise.
1396 * @param expr Expression to guard.
1397 */
1398#if defined(DEBUG_dmik)
1399# define NOT_DMIK(expr) do { } while (0)
1400#else
1401# define NOT_DMIK(expr) expr
1402#endif
1403
1404
1405#endif
1406
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