VirtualBox

Changeset 59184 in vbox


Ignore:
Timestamp:
Dec 18, 2015 1:38:29 PM (9 years ago)
Author:
vboxsync
Message:

iprt/list.h,DevIchHda.cpp: Introduced RTLISTNODER3 and RTLISTANCHORR3 to avoid ugly padding unions in cross context code.

Location:
trunk
Files:
2 edited

Legend:

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

    r57978 r59184  
    6969/** Pointer to a const doubly linked list anchor. */
    7070typedef RTLISTANCHOR const *PCRTLISTANCHOR;
     71
     72/** Version of RTLISTNODE for holding a ring-3 only list in data which gets
     73 * shared between multiple contexts */
     74#if defined(IN_RING3)
     75typedef RTLISTNODE RTLISTNODER3;
     76#else
     77typedef struct { RTR3PTR aOffLimits[2]; } RTLISTNODER3;
     78#endif
     79/** Version of RTLISTANCHOR for holding a ring-3 only list in data which gets
     80 * shared between multiple contexts */
     81typedef RTLISTNODER3 RTLISTANCHORR3;
    7182
    7283
  • trunk/src/VBox/Devices/Audio/DevIchHda.cpp

    r59182 r59184  
    651651typedef struct HDADRIVER
    652652{
    653     union
    654     {
    655         /** Node for storing this driver in our device driver
    656          *  list of HDASTATE. */
    657         RTLISTNODE                     Node;
    658         struct
    659         {
    660             R3PTRTYPE(void *)          dummy1;
    661             R3PTRTYPE(void *)          dummy2;
    662         } dummy;
    663     };
     653    /** Node for storing this driver in our device driver list of HDASTATE. */
     654    RTLISTNODER3                       Node;
    664655
    665656    /** Pointer to HDA controller (state). */
     
    754745    /** Pointer to HDA codec to use. */
    755746    R3PTRTYPE(PHDACODEC)               pCodec;
    756     union
    757     {
    758         /** List of associated LUN drivers (HDADRIVER). */
    759         RTLISTANCHOR                   lstDrv;
    760         /** Padding for alignment. */
    761         struct
    762         {
    763             R3PTRTYPE(void *)          dummy1;
    764             R3PTRTYPE(void *)          dummy2;
    765         } dummy;
    766     };
     747    /** List of associated LUN drivers (HDADRIVER). */
     748    RTLISTANCHORR3                     lstDrv;
    767749    /** The device' software mixer. */
    768750    R3PTRTYPE(PAUDIOMIXER)             pMixer;
Note: See TracChangeset for help on using the changeset viewer.

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