~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-10-13 23:06:00 UTC
  • mfrom: (0.3.2 upstream) (0.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20091013230600-xhu2pwizq0wo63l9
Tags: 3.0.8-dfsg-1ubuntu1
* Merge from debian unstable (LP: #444812), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
* Try to remove existing dkms modules before adding the new modules
  (LP: #434503)
  - debian/virtualbox-ose-source.postinst
  - debian/virtualbox-ose-guest-source.postinst
* Don't fail if dkms modules have already been removed
  - debian/virtualbox-ose-source.prerm
  - debian/virtualbox-ose-guest-source.prerm

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    else
60
60
        cTicks = 0;
61
61
 
62
 
#if 0
63
 
    timeout = ddi_get_lbolt();
64
 
    timeout += cTicks;
65
 
 
66
 
    kcondvar_t cnd;
67
 
    kmutex_t mtx;
68
 
    mutex_init(&mtx, "IPRT Sleep Mutex", MUTEX_DRIVER, NULL);
69
 
    cv_init(&cnd, "IPRT Sleep CV", CV_DRIVER, NULL);
70
 
    mutex_enter(&mtx);
71
 
    cv_timedwait (&cnd, &mtx, timeout);
72
 
    mutex_exit(&mtx);
73
 
    cv_destroy(&cnd);
74
 
    mutex_destroy(&mtx);
75
 
#endif
76
 
 
77
 
#if 1
78
62
    delay(cTicks);
79
 
#endif
80
 
 
81
 
#if 0
82
 
    /*   Hmm, no same effect as using delay() */
83
 
    struct timespec t;
84
 
    t.tv_sec = 0;
85
 
    t.tv_nsec = cMillies * 1000000L;
86
 
    nanosleep (&t, NULL);
87
 
#endif
88
 
 
89
63
    return VINF_SUCCESS;
90
64
}
91
65
 
121
95
RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
122
96
{
123
97
    AssertPtr(pState);
124
 
    Assert(pState->uchDummy != 42);
125
 
    pState->uchDummy = 42;
 
98
    Assert(pState->uOldPil == UINT32_MAX);
 
99
 
126
100
    vbi_preempt_disable();
 
101
 
 
102
    pState->uOldPil = getpil();
 
103
    Assert(pState->uOldPil != UINT32_MAX);
127
104
}
128
105
 
129
106
 
130
107
RTDECL(void) RTThreadPreemptRestore(PRTTHREADPREEMPTSTATE pState)
131
108
{
132
109
    AssertPtr(pState);
133
 
    Assert(pState->uchDummy == 42);
134
 
    pState->uchDummy = 0;
 
110
    Assert(pState->uOldPil != UINT32_MAX);
 
111
#if 0   /* not needed: This is fixed by r53110 */
 
112
    splx(pState->uOldPil);
 
113
#endif
 
114
 
135
115
    vbi_preempt_enable();
 
116
 
 
117
    pState->uOldPil = UINT32_MAX;
136
118
}
137
119