Changeset 19338 in vbox
- Timestamp:
- May 4, 2009 4:48:14 PM (16 years ago)
- 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 39 39 RTDECL(RTPROCESS) RTProcSelf(void) 40 40 { 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; 44 44 } 45 45 … … 47 47 RTR0DECL(RTR0PROCESS) RTR0ProcHandleSelf(void) 48 48 { 49 return (RTR0PROCESS)curproc; 49 proc_t *p = NULL; 50 drv_getparm(UPROCP, &p); 51 return (RTR0PROCESS)p; 50 52 } 51 53 -
trunk/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c
r11770 r19338 103 103 int rc; 104 104 kthread_t* pKernThread = thread_create(NULL, NULL, rtThreadNativeMain, pThreadInt, 0, 105 curproc, TS_RUN, minclsyspri);105 (void *)RTR0ProcHandleSelf(), TS_RUN, minclsyspri); 106 106 if (pKernThread) 107 107 { -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c
r16720 r19338 59 59 #include "vbi.h" 60 60 61 #define VBIPROC() ((proc_t *)vbi_proc()) 62 61 63 /* 62 64 * We have to use dl_lookup to find contig_free(). … … 254 256 vmem_free(heap_arena, va, size); 255 257 } else { 256 struct as *as = curproc->p_as;258 struct as *as = VBIPROC()->p_as; 257 259 258 260 as_rangelock(as); … … 379 381 vbi_proc(void) 380 382 { 381 return (curproc); 383 proc_t *p; 384 drv_getparm(UPROCP, &p); 385 return (p); 382 386 } 383 387 … … 398 402 399 403 t = thread_create(NULL, NULL, (void (*)())func, arg, len, 400 curproc, TS_RUN, priority);404 VBIPROC(), TS_RUN, priority); 401 405 return (t); 402 406 } … … 542 546 *handle = NULL; 543 547 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, 545 549 (caddr_t)addr, len, F_SOFTLOCK, S_WRITE); 546 550 if (err != 0) { … … 557 561 { 558 562 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); 561 565 } 562 566 … … 571 575 hat = kas.a_hat; 572 576 else 573 hat = curproc->p_as->a_hat;577 hat = VBIPROC()->p_as->a_hat; 574 578 pfn = hat_getpfnum(hat, (caddr_t)(v & PAGEMASK)); 575 579 if (pfn == PFN_INVALID) … … 825 829 vbi_user_map(caddr_t *va, uint_t prot, uint64_t *palist, size_t len) 826 830 { 827 struct as *as = curproc->p_as;831 struct as *as = VBIPROC()->p_as; 828 832 struct segvbi_crargs args; 829 833 int error = 0;
Note:
See TracChangeset
for help on using the changeset viewer.