VirtualBox

Ignore:
Timestamp:
May 1, 2009 12:41:07 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46737
Message:

VMM,VBoxDbg: SMP refactoring, part 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/TRPMInternal.h

    r19016 r19286  
    7373 * @param   pTRPM   Pointer to TRPM instance data.
    7474 */
    75 #define TRPM2VM(pTRPM)          ( (PVM)((char*)pTRPM - pTRPM->offVM) )
    76 #endif
    77 
    78 /**
    79  * Converts a TRPMCPU pointer into a VM pointer.
    80  * @returns Pointer to the VM structure the TRPMCPU is part of.
    81  * @param   pTRPM   Pointer to TRPMCPU instance data.
    82  */
    83 #define TRPMCPU2VM(pTrpmCpu)    ( (PVM)((char*)pTrpmCpu - pTrpmCpu->offVM) )
     75#define TRPM_2_VM(pTRPM)            ( (PVM)((uint8_t *)(pTRPM) - (pTRPM)->offVM) )
     76#endif
    8477
    8578/**
     
    8780 * @returns Pointer to the VM structure the TRPMCPU is part of.
    8881 * @param   pTRPM   Pointer to TRPMCPU instance data.
    89  */
    90 #define TRPM2TRPMCPU(pTrpmCpu)     ( (PTRPMCPU)((char*)pTrpmCpu + pTrpmCpu->offTRPMCPU) )
     82 * @remarks Raw-mode only, not SMP safe.
     83 */
     84#define TRPM_2_TRPMCPU(pTrpmCpu)     ( (PTRPMCPU)((uint8_t *)(pTrpmCpu) + (pTrpmCpu)->offTRPMCPU) )
     85
    9186
    9287/**
     
    9994{
    10095    /** Offset to the VM structure.
    101      * See TRPM2VM(). */
     96     * See TRPM_2_VM(). */
    10297    RTINT                   offVM;
    10398    /** Offset to the TRPMCPU structure.
     
    178173
    179174
     175/**
     176 * Converts a TRPMCPU pointer into a VM pointer.
     177 * @returns Pointer to the VM structure the TRPMCPU is part of.
     178 * @param   pTRPM   Pointer to TRPMCPU instance data.
     179 */
     180#define TRPMCPU_2_VM(pTrpmCpu)      ( (PVM)((uint8_t *)(pTrpmCpu) - (pTrpmCpu)->offVM) )
     181
     182/**
     183 * Converts a TRPMCPU pointer into a VMCPU pointer.
     184 * @returns Pointer to the VMCPU structure the TRPMCPU is part of.
     185 * @param   pTRPM   Pointer to TRPMCPU instance data.
     186 */
     187#define TRPMCPU_2_VMCPU(pTrpmCpu)   ( (PVMCPU)((uint8_t *)(pTrpmCpu) - (pTrpmCpu)->offVMCpu) )
     188
     189
     190/**
     191 * Per CPU data for TRPM.
     192 */
    180193typedef struct TRPMCPU
    181194{
    182     /** Offset to the VM structure.
    183      * See TRPMCPU2VM(). */
    184     RTINT                   offVM;
     195    /** Offset into the VM structure.
     196     * See TRPMCPU_2_VM(). */
     197    uint32_t                offVM;
     198    /** Offset into the VMCPU structure.
     199     * See TRPMCPU_2_VMCPU().  */
     200    uint32_t                offVMCpu;
     201
    185202    /** Active Interrupt or trap vector number.
    186203     * If not ~0U this indicates that we're currently processing
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