VirtualBox

Changeset 4155 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Aug 15, 2007 7:41:26 PM (17 years ago)
Author:
vboxsync
Message:

RTR0MemGetAddressR3 & RTR0MemObjLockUser. Linux memobj impl.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp

    r4119 r4155  
    2525#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_LINUX)
    2626#include <iprt/memobj.h>
    27 #endif 
     27#endif
    2828
    2929
     
    3131{
    3232    int rc = VINF_SUCCESS;
    33    
     33
    3434#ifdef RT_OS_WINDOWS
    3535    PMDL pMdl = IoAllocateMdl (pv, u32Size, FALSE, FALSE, NULL);
     
    4747                                 KernelMode,
    4848                                 (fWriteAccess) ? IoModifyAccess : IoReadAccess);
    49                                  
     49
    5050            *ppvCtx = pMdl;
    5151
     
    6666    /* Default to IPRT - this ASSUMES that it is USER addresses we're locking. */
    6767    RTR0MEMOBJ MemObj;
    68     rc = RTR0MemObjLockUser(&MemObj, pv, u32Size, NIL_RTR0PROCESS);
     68    rc = RTR0MemObjLockUser(&MemObj, (RTR3PTR)pv, u32Size, NIL_RTR0PROCESS);
    6969    if (RT_SUCCESS(rc))
    7070        *ppvCtx = MemObj;
     
    7373
    7474#endif
    75    
     75
    7676    return rc;
    7777}
     
    123123#ifdef RT_OS_OS2
    124124__BEGIN_DECLS
    125 /* 
    126  * On OS/2 we'll do the connecting in the assembly code of the 
     125/*
     126 * On OS/2 we'll do the connecting in the assembly code of the
    127127 * client driver, exporting a g_VBoxGuestIDC symbol containing
    128128 * the connection information obtained from the 16-bit IDC.
     
    130130extern VBOXGUESTOS2IDCCONNECT g_VBoxGuestIDC;
    131131__END_DECLS
    132 #endif 
     132#endif
    133133
    134134
     
    168168
    169169#elif defined (RT_OS_OS2)
    170     /* 
     170    /*
    171171     * Just check whether the connection was made or not.
    172172     */
     
    221221                                   NULL);
    222222
    223         rc = ioStatusBlock.Status;                     
    224     }   
     223        rc = ioStatusBlock.Status;
     224    }
    225225
    226226    if (!NT_SUCCESS(rc))
     
    233233
    234234#elif defined (RT_OS_OS2)
    235     if (    pDriver->u32Session 
     235    if (    pDriver->u32Session
    236236        &&  pDriver->u32Session == g_VBoxGuestIDC.u32Session)
    237237        return g_VBoxGuestIDC.pfnServiceEP(pDriver->u32Session, u32Function, pvData, cbData, NULL);
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