VirtualBox

Changeset 22387 in vbox


Ignore:
Timestamp:
Aug 21, 2009 1:27:13 PM (15 years ago)
Author:
vboxsync
Message:

Solaris/Preemption: #4147, #4197: Raise PIL for fastcall, check PIL in IsPreemptEnabled.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r22386 r22387  
    504504# when working VT-x/AMD-V in VMMR0.
    505505## @todo os2? Reconsider perhaps windows? (see defect) This should be made the default.
    506 if1of ($(KBUILD_TARGET), darwin freebsd linux windows)
     506if1of ($(KBUILD_TARGET), darwin freebsd linux windows solaris)
    507507 VBOX_WITH_VMMR0_DISABLE_PREEMPTION = 1
    508508endif
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r21605 r22387  
    4747#include <sys/file.h>
    4848#include <sys/priv_names.h>
     49#include <sys/spl.h>
    4950#undef u /* /usr/include/sys/user.h:249:1 is where this is defined to (curproc->p_user). very cool. */
    5051
     
    677678        ||  Cmd == SUP_IOCTL_FAST_DO_NOP)
    678679    {
     680        int SavePil = splr(ipltospl(DISP_LEVEL));
    679681        *pVal = supdrvIOCtlFast(Cmd, pArgs, &g_DevExt, pSession);
     682        splx(SavePil);
    680683        return 0;
    681684    }
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c

    r22150 r22387  
    6767        cTicks = 0;
    6868
    69 #if 0
    70     timeout = ddi_get_lbolt();
    71     timeout += cTicks;
    72 
    73     kcondvar_t cnd;
    74     kmutex_t mtx;
    75     mutex_init(&mtx, "IPRT Sleep Mutex", MUTEX_DRIVER, NULL);
    76     cv_init(&cnd, "IPRT Sleep CV", CV_DRIVER, NULL);
    77     mutex_enter(&mtx);
    78     cv_timedwait (&cnd, &mtx, timeout);
    79     mutex_exit(&mtx);
    80     cv_destroy(&cnd);
    81     mutex_destroy(&mtx);
    82 #endif
    83 
    84 #if 1
    8569    delay(cTicks);
    86 #endif
    87 
    88 #if 0
    89     /*   Hmm, no same effect as using delay() */
    90     struct timespec t;
    91     t.tv_sec = 0;
    92     t.tv_nsec = cMillies * 1000000L;
    93     nanosleep (&t, NULL);
    94 #endif
    95 
    9670    return VINF_SUCCESS;
    9771}
     
    11084    if (    vbi_is_preempt_enabled()
    11185        &&  ASMIntAreEnabled())
     86        return true;
     87    if (getpil() < DISP_LEVEL)
    11288        return true;
    11389    return false;
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