VirtualBox

Changeset 19338 in vbox


Ignore:
Timestamp:
May 4, 2009 4:48:14 PM (16 years ago)
Author:
vboxsync
Message:

3880 VirtualBox and Solaris build 114 - don't use curproc

Location:
trunk/src/VBox/Runtime/r0drv/solaris
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/process-r0drv-solaris.c

    r13299 r19338  
    3939RTDECL(RTPROCESS) RTProcSelf(void)
    4040{
    41     /* use ddi_get_pid()? */
    42     struct pid *pPidInfo = curproc->p_pidp;
    43     return pPidInfo->pid_id;
     41    pid_t pid = -1;
     42    drv_getparm(PPID, &pid);
     43    return (RTPROCESS)pid;
    4444}
    4545
     
    4747RTR0DECL(RTR0PROCESS) RTR0ProcHandleSelf(void)
    4848{
    49     return (RTR0PROCESS)curproc;
     49    proc_t *p = NULL;
     50    drv_getparm(UPROCP, &p);
     51    return (RTR0PROCESS)p;
    5052}
    5153
  • trunk/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c

    r11770 r19338  
    103103    int rc;
    104104    kthread_t* pKernThread = thread_create(NULL, NULL, rtThreadNativeMain, pThreadInt, 0,
    105                                            curproc, TS_RUN, minclsyspri);
     105                                           (void *)RTR0ProcHandleSelf(), TS_RUN, minclsyspri);
    106106    if (pKernThread)
    107107    {
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c

    r16720 r19338  
    5959#include "vbi.h"
    6060
     61#define VBIPROC() ((proc_t *)vbi_proc())
     62
    6163/*
    6264 * We have to use dl_lookup to find contig_free().
     
    254256                vmem_free(heap_arena, va, size);
    255257        } else {
    256                 struct as *as = curproc->p_as;
     258                struct as *as = VBIPROC()->p_as;
    257259
    258260                as_rangelock(as);
     
    379381vbi_proc(void)
    380382{
    381         return (curproc);
     383        proc_t *p;
     384        drv_getparm(UPROCP, &p);
     385        return (p);
    382386}
    383387
     
    398402
    399403        t = thread_create(NULL, NULL, (void (*)())func, arg, len,
    400             curproc, TS_RUN, priority);
     404            VBIPROC(), TS_RUN, priority);
    401405        return (t);
    402406}
     
    542546        *handle = NULL;
    543547        if (!IS_KERNEL(addr)) {
    544                 err = as_fault(curproc->p_as->a_hat, curproc->p_as,
     548                err = as_fault(VBIPROC()->p_as->a_hat, VBIPROC()->p_as,
    545549                    (caddr_t)addr, len, F_SOFTLOCK, S_WRITE);
    546550                if (err != 0) {
     
    557561{
    558562        if (!IS_KERNEL(addr))
    559                 as_fault(curproc->p_as->a_hat, curproc->p_as, (caddr_t)addr,
    560                     len, F_SOFTUNLOCK, S_WRITE);
     563                as_fault(VBIPROC()->p_as->a_hat, VBIPROC()->p_as,
     564                    (caddr_t)addr, len, F_SOFTUNLOCK, S_WRITE);
    561565}
    562566
     
    571575                hat = kas.a_hat;
    572576        else
    573                 hat = curproc->p_as->a_hat;
     577                hat = VBIPROC()->p_as->a_hat;
    574578        pfn = hat_getpfnum(hat, (caddr_t)(v & PAGEMASK));
    575579        if (pfn == PFN_INVALID)
     
    825829vbi_user_map(caddr_t *va, uint_t prot, uint64_t *palist, size_t len)
    826830{
    827         struct as *as = curproc->p_as;
     831        struct as *as = VBIPROC()->p_as;
    828832        struct segvbi_crargs args;
    829833        int error = 0;
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