VirtualBox

Changeset 22925 in vbox


Ignore:
Timestamp:
Sep 10, 2009 10:24:58 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52190
Message:

Devices: Alignment fun. (32-bit darwin)

Location:
trunk/src/VBox/Devices
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r22793 r22925  
    329329#endif /* VBOX_WITH_STATISTICS */
    330330};
     331AssertCompileMemberAlignment(PCNetState, StatReceiveBytes, 8);
    331332
    332333#define PCNETSTATE_2_DEVINS(pPCNet)            ((pPCNet)->CTX_SUFF(pDevIns))
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r22827 r22925  
    167167    /** The read end of the control pipe. */
    168168    RTFILE                  PipeRead;
     169# if HC_ARCH_BITS == 32
     170    /** Alignment padding. */
     171    uint32_t                u32Alignment;
     172# endif
    169173#else
    170174    /** for external notification */
     
    184188#endif
    185189} DRVNAT;
     190AssertCompileMemberAlignment(DRVNAT, StatNATRecvWakeups, 8);
    186191/** Pointer the NAT driver instance data. */
    187192typedef DRVNAT *PDRVNAT;
  • trunk/src/VBox/Devices/PC/DevAPIC.cpp

    r22793 r22925  
    241241    R3PTRTYPE(char *)       pszDesc;
    242242# ifdef VBOX_WITH_STATISTICS
     243#  if HC_ARCH_BITS == 32
     244    uint32_t                u32Alignment0;
     245#  endif
    243246    STAMCOUNTER             StatTimerSetInitialCount;
    244247    STAMCOUNTER             StatTimerSetInitialCountArm;
     
    254257#endif /* VBOX */
    255258} APICState;
     259#ifdef VBOX
     260AssertCompileMemberAlignment(APICState, initial_count_load_time, 8);
     261# ifdef VBOX_WITH_STATISTICS
     262AssertCompileMemberAlignment(APICState, StatTimerSetInitialCount, 8);
     263# endif
     264#endif
    256265
    257266struct IOAPICState {
     
    320329    /** The critical section - R3 Ptr. */
    321330    RCPTRTYPE(PPDMCRITSECT) pCritSectRC;
    322     RTRCPTR                 Padding0;
    323331
    324332    /** APIC specification version in this virtual hardware configuration. */
     
    332340
    333341# ifdef VBOX_WITH_STATISTICS
     342    uint32_t                u32Alignment0;
    334343    STAMCOUNTER             StatMMIOReadGC;
    335344    STAMCOUNTER             StatMMIOReadHC;
     
    339348# endif
    340349} APICDeviceInfo;
     350# ifdef VBOX_WITH_STATISTICS
     351AssertCompileMemberAlignment(APICDeviceInfo, StatMMIOReadGC, 8);
     352# endif
    341353#endif /* VBOX */
    342354
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r22793 r22925  
    266266    /** The LUN #. */
    267267    RTUINT                          iLUN;
    268 #if HC_ARCH_BITS == 64
    269268    RTUINT                          Alignment2; /**< Align pDevInsR3 correctly. */
    270 #endif
    271269    /** Pointer to device instance. */
    272270    PPDMDEVINSR3                        pDevInsR3;
     
    289287    char                                szModelNumber[ATA_MODEL_NUMBER_LENGTH+1];
    290288
    291 #if HC_ARCH_BITS == 64
    292     uint32_t                            Alignment3[2];
    293 #endif
     289    uint8_t                             abAlignment3[HC_ARCH_BITS == 32 ? 7 : 7];
    294290} ATADevState;
     291AssertCompileMemberAlignment(ATADevState, cTotalSectors, 8);
     292AssertCompileMemberAlignment(ATADevState, StatATADMA, 8);
     293AssertCompileMemberAlignment(ATADevState, u64CmdTS, 8);
     294AssertCompileMemberAlignment(ATADevState, pDevInsR3, 8);
     295AssertCompileMemberAlignment(ATADevState, szSerialNumber, 8);
     296AssertCompileSizeAlignment(ATADevState, 8);
    295297
    296298
     
    422424    STAMPROFILE     StatLockWait;
    423425} ATACONTROLLER, *PATACONTROLLER;
     426AssertCompileMemberAlignment(ATACONTROLLER, lock, 8);
     427AssertCompileMemberAlignment(ATACONTROLLER, aIfs, 8);
     428AssertCompileMemberAlignment(ATACONTROLLER, aIfs[1], 8);
     429AssertCompileMemberAlignment(ATACONTROLLER, u64ResetTime, 8);
     430AssertCompileMemberAlignment(ATACONTROLLER, StatAsyncOps, 8);
    424431
    425432typedef enum CHIPSET
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