Changeset 22418 in vbox for trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
- Timestamp:
- Aug 24, 2009 3:47:01 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51399
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
r22151 r22418 5 5 6 6 /* 7 * Copyright (C) 2006-200 7Sun Microsystems, Inc.7 * Copyright (C) 2006-2009 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 113 113 if (!ASMIntAreEnabled()) 114 114 return false; 115 if (getpil() >= DISP_LEVEL) 116 return false; 115 117 return true; 116 118 } … … 120 122 { 121 123 Assert(hThread == NIL_RTTHREAD); 122 /** @todo Review this! */123 124 return CPU->cpu_runrun != 0 124 125 || CPU->cpu_kprunrun != 0; … … 143 144 { 144 145 AssertPtr(pState); 145 Assert(pState->u32Reserved == 0); 146 pState->u32Reserved = 42; 146 Assert(pState->uOldPil == UINT32_MAX); 147 147 148 148 kpreempt_disable(); 149 /// @todo check out splr and splx on S10! 150 // if (ASMIntAreEnabled()) 151 pState->uOldPil = splr(ipltospl(DISP_LEVEL)); 152 // else 153 // { 154 // /* splr doesn't restore the interrupt flag on S10. */ 155 // pState->uOldPil = getpil(); 156 // if (pState->uOldPil < DISP_LEVEL) 157 // pState->uOldPil = splx(DISP_LEVEL); 158 // } 159 Assert(pState->uOldPil != UINT32_MAX) 149 160 RT_ASSERT_PREEMPT_CPUID_DISABLE(pState); 150 161 } … … 154 165 { 155 166 AssertPtr(pState); 156 Assert(pState->u32Reserved == 42); 157 pState->u32Reserved = 0; 167 Assert(pState->uOldPil != UINT32_MAX) 158 168 RT_ASSERT_PREEMPT_CPUID_RESTORE(pState); 159 169 170 splx(pState->uOldPil); 160 171 kpreempt_enable(); 172 173 pState->uOldPil = UINT32_MAX; 161 174 } 162 175 … … 164 177 RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread) 165 178 { 179 /** @todo it looks like checking for spl > LOCK_LEVEL and interrupts disabled 180 * is more accurate than this... */ 166 181 /* This is the best we currently can do here. :-( */ 167 182 return !RTThreadPreemptIsEnabled(hThread)
Note:
See TracChangeset
for help on using the changeset viewer.