VirtualBox

Ignore:
Timestamp:
Jan 27, 2007 8:05:44 PM (18 years ago)
Author:
vboxsync
Message:

RTProcSelf, RTR0ProcHandleSelf, RTR0PROCESS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp

    r377 r385  
    3232#include <iprt/param.h>
    3333#include <iprt/string.h>
     34#include <iprt/process.h>
    3435#include "internal/memobj.h"
    3536
     
    9495        {
    9596#ifdef USE_VM_MAP_WIRE
    96             vm_map_t Map = pMemDarwin->Core.u.Lock.Process != NIL_RTPROCESS
    97                          ? get_task_map((task_t)pMemDarwin->Core.u.Lock.Process)
     97            vm_map_t Map = pMemDarwin->Core.u.Lock.R0Process != NIL_RTR0PROCESS
     98                         ? get_task_map((task_t)pMemDarwin->Core.u.Lock.R0Process)
    9899                         : kernel_map;
    99100            kern_return_t kr = vm_map_unwire(Map,
     
    377378        if (pMemDarwin)
    378379        {
    379             pMemDarwin->Core.u.Lock.Process = (RTPROCESS)Task;
     380            pMemDarwin->Core.u.Lock.R0Process = (RTR0PROCESS)Task;
    380381            *ppMem = &pMemDarwin->Core;
    381382            return VINF_SUCCESS;
     
    404405            if (pMemDarwin)
    405406            {
    406                 pMemDarwin->Core.u.Lock.Process = (RTPROCESS)Task;
     407                pMemDarwin->Core.u.Lock.R0Process = (RTR0PROCESS)Task;
    407408                pMemDarwin->pMemDesc = pMemDesc;
    408409                *ppMem = &pMemDarwin->Core;
     
    470471                if (pMemDarwin)
    471472                {
    472                     pMemDarwin->Core.u.Mapping.Process = NIL_RTPROCESS;
     473                    pMemDarwin->Core.u.Mapping.R0Process = NIL_RTR0PROCESS;
    473474                    pMemDarwin->pMemMap = pMemMap;
    474475                    *ppMem = &pMemDarwin->Core;
     
    514515                if (pMemDarwin)
    515516                {
    516                     pMemDarwin->Core.u.Mapping.Process = /*RTProcSelf()*/(RTPROCESS)current_task();
     517                    pMemDarwin->Core.u.Mapping.R0Process = RTR0ProcHandleSelf();
    517518                    pMemDarwin->pMemMap = pMemMap;
    518519                    *ppMem = &pMemDarwin->Core;
     
    546547    {
    547548        ppnum_t PgNo;
    548         if (pMemDarwin->Core.u.Lock.Process == NIL_RTPROCESS)
     549        if (pMemDarwin->Core.u.Lock.R0Process == NIL_RTR0PROCESS)
    549550            PgNo = pmap_find_phys(kernel_pmap, (uintptr_t)pMemDarwin->Core.pv + iPage * PAGE_SIZE);
    550551        else
     
    575576                AssertReturn(s_offPmap >= 0, NIL_RTHCPHYS);
    576577            }
    577             pmap_t Pmap = *(pmap_t *)((uintptr_t)get_task_map((task_t)pMemDarwin->Core.u.Lock.Process) + s_offPmap);
     578            pmap_t Pmap = *(pmap_t *)((uintptr_t)get_task_map((task_t)pMemDarwin->Core.u.Lock.R0Process) + s_offPmap);
    578579            PgNo = pmap_find_phys(Pmap, (uintptr_t)pMemDarwin->Core.pv + iPage * PAGE_SIZE);
    579580        }
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