VirtualBox

Changeset 39138 in vbox for trunk


Ignore:
Timestamp:
Oct 28, 2011 2:29:51 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74591
Message:

iprt/types.h,IEM: Moved the pointer union types to iprt/types.h, adding volatile versions of it.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/types.h

    r38872 r39138  
    686686typedef const RTMSINTERVAL *PCRTMSINTERVAL;
    687687
     688/**
     689 * Generic pointer union.
     690 */
     691typedef union RTPTRUNION
     692{
     693    /** Pointer into the void... */
     694    void               *pv;
     695    /** Pointer to a 8-bit unsigned value. */
     696    uint8_t            *pu8;
     697    /** Pointer to a 16-bit unsigned value. */
     698    uint16_t           *pu16;
     699    /** Pointer to a 32-bit unsigned value. */
     700    uint32_t           *pu32;
     701    /** Pointer to a 64-bit unsigned value. */
     702    uint64_t           *pu64;
     703} RTPTRUNION;
     704/** Pointer to a pointer union. */
     705typedef RTPTRUNION *PRTPTRUNION;
     706
     707/**
     708 * Generic const pointer union.
     709 */
     710typedef union RTCPTRUNION
     711{
     712    /** Pointer into the void... */
     713    void const         *pv;
     714    /** Pointer to a 8-bit unsigned value. */
     715    uint8_t const      *pu8;
     716    /** Pointer to a 16-bit unsigned value. */
     717    uint16_t const     *pu16;
     718    /** Pointer to a 32-bit unsigned value. */
     719    uint32_t const     *pu32;
     720    /** Pointer to a 64-bit unsigned value. */
     721    uint64_t const     *pu64;
     722} RTCPTRUNION;
     723/** Pointer to a const pointer union. */
     724typedef RTCPTRUNION *PRTCPTRUNION;
     725
     726/**
     727 * Generic volatile pointer union.
     728 */
     729typedef union RTVPTRUNION
     730{
     731    /** Pointer into the void... */
     732    void volatile      *pv;
     733    /** Pointer to a 8-bit unsigned value. */
     734    uint8_t volatile   *pu8;
     735    /** Pointer to a 16-bit unsigned value. */
     736    uint16_t volatile  *pu16;
     737    /** Pointer to a 32-bit unsigned value. */
     738    uint32_t volatile  *pu32;
     739    /** Pointer to a 64-bit unsigned value. */
     740    uint64_t volatile  *pu64;
     741} RTVPTRUNION;
     742/** Pointer to a const pointer union. */
     743typedef RTVPTRUNION *PRTVPTRUNION;
     744
     745/**
     746 * Generic const volatile pointer union.
     747 */
     748typedef union RTCVPTRUNION
     749{
     750    /** Pointer into the void... */
     751    void const volatile        *pv;
     752    /** Pointer to a 8-bit unsigned value. */
     753    uint8_t const volatile     *pu8;
     754    /** Pointer to a 16-bit unsigned value. */
     755    uint16_t const volatile    *pu16;
     756    /** Pointer to a 32-bit unsigned value. */
     757    uint32_t const volatile    *pu32;
     758    /** Pointer to a 64-bit unsigned value. */
     759    uint64_t const volatile    *pu64;
     760} RTCVPTRUNION;
     761/** Pointer to a const pointer union. */
     762typedef RTCVPTRUNION *PRTCVPTRUNION;
     763
    688764
    689765/** @defgroup grp_rt_types_both  Common Guest and Host Context Basic Types
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r39127 r39138  
    6969*   Structures and Typedefs                                                    *
    7070*******************************************************************************/
    71 /**
    72  * Generic pointer union.
    73  * @todo move me to iprt/types.h
    74  */
    75 typedef union RTPTRUNION
    76 {
    77     /** Pointer into the void... */
    78     void        *pv;
    79     /** Pointer to a 8-bit unsigned value. */
    80     uint8_t     *pu8;
    81     /** Pointer to a 16-bit unsigned value. */
    82     uint16_t    *pu16;
    83     /** Pointer to a 32-bit unsigned value. */
    84     uint32_t    *pu32;
    85     /** Pointer to a 64-bit unsigned value. */
    86     uint64_t    *pu64;
    87 } RTPTRUNION;
    88 /** Pointer to a pointer union. */
    89 typedef RTPTRUNION *PRTPTRUNION;
    90 
    91 /**
    92  * Generic const pointer union.
    93  * @todo move me to iprt/types.h
    94  */
    95 typedef union RTCPTRUNION
    96 {
    97     /** Pointer into the void... */
    98     void const       *pv;
    99     /** Pointer to a 8-bit unsigned value. */
    100     uint8_t const     *pu8;
    101     /** Pointer to a 16-bit unsigned value. */
    102     uint16_t const    *pu16;
    103     /** Pointer to a 32-bit unsigned value. */
    104     uint32_t const    *pu32;
    105     /** Pointer to a 64-bit unsigned value. */
    106     uint64_t const    *pu64;
    107 } RTCPTRUNION;
    108 /** Pointer to a const pointer union. */
    109 typedef RTCPTRUNION *PRTCPTRUNION;
    110 
    11171/** @typedef PFNIEMOP
    11272 * Pointer to an opcode decoder function.
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