VirtualBox

Changeset 22802 in vbox


Ignore:
Timestamp:
Sep 7, 2009 11:01:40 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52009
Message:

VBox/cdefs.h: Added VMM*_INT_DECL and made the VMMR?CDECL macros use DECL_INVALID for contexts where they aren't valid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/cdefs.h

    r19287 r22802  
    253253 */
    254254#ifdef IN_VMM_R3
    255 # define VMMR3DECL(type)    DECLEXPORT(type) VBOXCALL
    256 #else
    257 # define VMMR3DECL(type)    DECLIMPORT(type) VBOXCALL
     255# define VMMR3DECL(type)            DECLEXPORT(type) VBOXCALL
     256#elif defined(IN_RING3)
     257# define VMMR3DECL(type)            DECLIMPORT(type) VBOXCALL
     258#else
     259# define VMMR3DECL(type)            DECL_INVALID(type)
    258260#endif
    259261
     
    267269 */
    268270#ifdef IN_VMM_R0
    269 # define VMMR0DECL(type)    DECLEXPORT(type) VBOXCALL
    270 #else
    271 # define VMMR0DECL(type)    DECLIMPORT(type) VBOXCALL
     271# define VMMR0DECL(type)            DECLEXPORT(type) VBOXCALL
     272#elif defined(IN_RING0)
     273# define VMMR0DECL(type)            DECLIMPORT(type) VBOXCALL
     274#else
     275# define VMMR0DECL(type)            DECL_INVALID(type)
    272276#endif
    273277
     
    281285 */
    282286#ifdef IN_VMM_RC
    283 # define VMMRCDECL(type)    DECLEXPORT(type) VBOXCALL
    284 #else
    285 # define VMMRCDECL(type)    DECLIMPORT(type) VBOXCALL
     287# define VMMRCDECL(type)            DECLEXPORT(type) VBOXCALL
     288#elif defined(IN_RC)
     289# define VMMRCDECL(type)            DECLIMPORT(type) VBOXCALL
     290#else
     291# define VMMRCDECL(type)            DECL_INVALID(type)
    286292#endif
    287293
     
    291297 */
    292298#if defined(IN_VMM_R0) || defined(IN_VMM_RC)
    293 # define VMMRZDECL(type)    DECLEXPORT(type) VBOXCALL
    294 #else
    295 # define VMMRZDECL(type)    DECLIMPORT(type) VBOXCALL
     299# define VMMRZDECL(type)            DECLEXPORT(type) VBOXCALL
     300#elif defined(IN_RING0) || defined(IN_RZ)
     301# define VMMRZDECL(type)            DECLIMPORT(type) VBOXCALL
     302#else
     303# define VMMRZDECL(type)            DECL_INVALID(type)
    296304#endif
    297305
     
    301309 */
    302310#if defined(IN_VMM_R3) || defined(IN_VMM_R0) || defined(IN_VMM_RC)
    303 # define VMMDECL(type)      DECLEXPORT(type) VBOXCALL
    304 #else
    305 # define VMMDECL(type)      DECLIMPORT(type) VBOXCALL
     311# define VMMDECL(type)              DECLEXPORT(type) VBOXCALL
     312#else
     313# define VMMDECL(type)              DECLIMPORT(type) VBOXCALL
     314#endif
     315
     316/** @def VMM_INT_DECL
     317 * VMM internal function.
     318 * @param   type    The return type of the function declaration.
     319 */
     320#if defined(IN_VMM_R3) || defined(IN_VMM_R0) || defined(IN_VMM_RC)
     321# define VMM_INT_DECL(type)         DECLHIDDEN(type) VBOXCALL
     322#else
     323# define VMM_INT_DECL(type)         DECL_INVALID(type)
     324#endif
     325
     326/** @def VMMR3_INT_DECL
     327 * VMM internal function, ring-3.
     328 * @param   type    The return type of the function declaration.
     329 */
     330#ifdef IN_VMM_R3
     331# define VMMR3_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
     332#else
     333# define VMMR3_INT_DECL(type)       DECL_INVALID(type)
     334#endif
     335
     336/** @def VMMR0_INT_DECL
     337 * VMM internal function, ring-0.
     338 * @param   type    The return type of the function declaration.
     339 */
     340#ifdef IN_VMM_R0
     341# define VMMR0_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
     342#else
     343# define VMMR0_INT_DECL(type)       DECL_INVALID(type)
     344#endif
     345
     346/** @def VMMRC_INT_DECL
     347 * VMM internal function, raw-mode context.
     348 * @param   type    The return type of the function declaration.
     349 */
     350#ifdef IN_VMM_RC
     351# define VMMRC_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
     352#else
     353# define VMMRC_INT_DECL(type)       DECL_INVALID(type)
     354#endif
     355
     356/** @def VMMRZ_INT_DECL
     357 * VMM internal function, ring-0 + raw-mode context.
     358 * @param   type    The return type of the function declaration.
     359 */
     360#ifdef IN_VMM_RZ
     361# define VMMRZ_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
     362#else
     363# define VMMRZ_INT_DECL(type)       DECL_INVALID(type)
    306364#endif
    307365
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette