Changeset 22773 in vbox
- Timestamp:
- Sep 4, 2009 10:14:17 AM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/solaris
- Files:
-
- 2 edited
-
semevent-r0drv-solaris.c (modified) (1 diff)
-
semeventmulti-r0drv-solaris.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c
r22770 r22773 142 142 * If we're in interrupt context we need to unpin the underlying current 143 143 * thread as this could lead to a deadlock (see #4259 for the full explanation) 144 * 145 * Note! This assumes nobody is using the RTThreadPreemptDisable in an 146 * interrupt context and expects it to work right. The swtch will 147 * result in a voluntary preemption. To fix this, we would have to 148 * do our own counting in RTThreadPreemptDisable/Restore like we do 149 * on systems which doesn't do preemption (OS/2, linux, ...) and 150 * check whether preemption was disabled via RTThreadPreemptDisable 151 * or not and only call swtch if RTThreadPreemptDisable wasn't called. 144 152 */ 145 153 int fAcquired = mutex_tryenter(&pEventInt->Mtx); -
trunk/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c
r22770 r22773 141 141 * If we're in interrupt context we need to unpin the underlying current 142 142 * thread as this could lead to a deadlock (see #4259 for the full explanation) 143 * 144 * Note! See remarks about preemption in RTSemEventSignal. 143 145 */ 144 146 int fAcquired = mutex_tryenter(&pThis->Mtx); … … 177 179 RT_ASSERT_INTS_ON(); 178 180 179 mutex_enter(&pThis->Mtx); 181 /* 182 * If we're in interrupt context we need to unpin the underlying current 183 * thread as this could lead to a deadlock (see #4259 for the full explanation) 184 * 185 * Note! See remarks about preemption in RTSemEventSignal. 186 */ 187 int fAcquired = mutex_tryenter(&pThis->Mtx); 188 if (!fAcquired) 189 { 190 if (curthread->t_intr && getpil() < DISP_LEVEL) 191 swtch(); 192 193 mutex_enter(&pThis->Mtx); 194 } 195 180 196 ASMAtomicXchgU8(&pThis->fSignaled, false); 181 197 mutex_exit(&pThis->Mtx);
Note:
See TracChangeset
for help on using the changeset viewer.

