VirtualBox

Changeset 22614 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Aug 31, 2009 3:43:41 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51673
Message:

Solaris/r0drvthread: temporary #4147

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

Legend:

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

    r22566 r22614  
    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
    9570
    9671    return VINF_SUCCESS;
     
    144119{
    145120    AssertPtr(pState);
    146     Assert(pState->u32Reserved == 0);
    147     pState->u32Reserved = 42;
    148 
     121    Assert(pState->uOldPil == UINT32_MAX);
    149122    kpreempt_disable();
     123    pState->uOldPil = splr(ipltospl(LOCK_LEVEL - 1));
     124    Assert(pState->uOldPil != UINT32_MAX);   
    150125    RT_ASSERT_PREEMPT_CPUID_DISABLE(pState);
    151126}
     
    155130{
    156131    AssertPtr(pState);
    157     Assert(pState->u32Reserved == 42);
    158     pState->u32Reserved = 0;
     132    Assert(pState->uOldPil != UINT32_MAX);
    159133    RT_ASSERT_PREEMPT_CPUID_RESTORE(pState);
    160 
     134    splx(pState->uOldPil);   
    161135    kpreempt_enable();
     136    pState->uOldPil = UINT32_MAX;
    162137}
    163138
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c

    r22566 r22614  
    116116{
    117117    AssertPtr(pState);
    118     Assert(pState->u32Reserved == 0);
    119     pState->u32Reserved = 42;
     118    Assert(pState->uOldPil == UINT32_MAX);
     119
    120120    vbi_preempt_disable();
     121
     122    pState->uOldPil = splr(ipltospl(LOCK_LEVEL - 8));
     123    Assert(pState->uOldPil != UINT32_MAX);
    121124    RT_ASSERT_PREEMPT_CPUID_DISABLE(pState);
    122125}
     
    126129{
    127130    AssertPtr(pState);
    128     Assert(pState->u32Reserved == 42);
    129     pState->u32Reserved = 0;
    130131    RT_ASSERT_PREEMPT_CPUID_RESTORE(pState);
     132    Assert(g_frtSolarisSplSetsEIF && pState->uOldPil != UINT32_MAX);
     133    splx(pState->uOldPil);
     134
    131135    vbi_preempt_enable();
     136
     137    pState->uOldPil = UINT32_MAX;
    132138}
    133139
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette