Changeset 4155 in vbox for trunk/src/VBox/Runtime/r0drv/os2
- Timestamp:
- Aug 15, 2007 7:41:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
r4136 r4155 242 242 243 243 244 int rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, RTR0PROCESS R0Process)244 int rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, RTR0PROCESS R0Process) 245 245 { 246 246 AssertMsgReturn(R0Process == RTR0ProcHandleSelf(), ("%p != %p\n", R0Process, RTR0ProcHandleSelf()), VERR_NOT_SUPPORTED); … … 248 248 /* create the object. */ 249 249 const ULONG cPages = cb >> PAGE_SHIFT; 250 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_OFFSETOF(RTR0MEMOBJOS2, aPages[cPages]), RTR0MEMOBJTYPE_LOCK, pv, cb);250 PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_OFFSETOF(RTR0MEMOBJOS2, aPages[cPages]), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb); 251 251 if (!pMemOs2) 252 252 return VERR_NO_MEMORY; … … 254 254 /* lock it. */ 255 255 ULONG cPagesRet = cPages; 256 int rc = KernVMLock(VMDHL_LONG | VMDHL_WRITE, pv, cb, &pMemOs2->Lock, &pMemOs2->aPages[0], &cPagesRet);256 int rc = KernVMLock(VMDHL_LONG | VMDHL_WRITE, (void *)R3Ptr, cb, &pMemOs2->Lock, &pMemOs2->aPages[0], &cPagesRet); 257 257 if (!rc) 258 258 { 259 259 rtR0MemObjFixPageList(&pMemOs2->aPages[0], cPages, cPagesRet); 260 260 Assert(cb == pMemOs2->Core.cb); 261 Assert( pv ==pMemOs2->Core.pv);261 Assert(R3Ptr == (RTR3PTR)pMemOs2->Core.pv); 262 262 pMemOs2->Core.u.Lock.R0Process = R0Process; 263 263 *ppMem = &pMemOs2->Core;
Note:
See TracChangeset
for help on using the changeset viewer.