Changeset 21536 in vbox for trunk/src/VBox/Runtime/r0drv/solaris
- Timestamp:
- Jul 13, 2009 2:49:39 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50009
- Location:
- trunk/src/VBox/Runtime/r0drv/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
r20124 r21536 29 29 */ 30 30 31 31 32 /******************************************************************************* 32 33 * Header Files * … … 35 36 36 37 #include <iprt/thread.h> 37 #include <iprt/err.h>38 38 #include <iprt/asm.h> 39 39 #include <iprt/assert.h> 40 #include <iprt/err.h> 40 41 41 42 … … 105 106 if (curthread->t_preempt != 0) 106 107 return false; 107 #if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64) 108 if (!(ASMGetFlags() & 0x00000200 /* X86_EFL_IF */)) 108 if (!ASMIntAreEnabled()) 109 109 return false; 110 #endif111 110 return true; 112 111 } … … 125 124 { 126 125 /* yes, RTThreadPreemptIsPending is reliable. */ 126 return true; 127 } 128 129 130 RTDECL(bool) RTThreadPreemptIsPossible(void) 131 { 132 /* yes, kernel preemption is possible. */ 127 133 return true; 128 134 } … … 148 154 } 149 155 156 157 RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread) 158 { 159 Assert(hThread == NIL_RTTHREAD); NOREF(hThread); 160 /** @todo Solaris: Implement RTThreadIsInInterrupt. Required for guest 161 * additions! */ 162 return !ASMIntAreEnabled(); 163 } 164 -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c
r21452 r21536 29 29 */ 30 30 31 31 32 /******************************************************************************* 32 33 * Header Files * … … 35 36 36 37 #include <iprt/thread.h> 38 #include <iprt/asm.h> 39 #include <iprt/assert.h> 37 40 #include <iprt/err.h> 38 #include <iprt/assert.h> 41 39 42 40 43 RTDECL(RTNATIVETHREAD) RTThreadNativeSelf(void) … … 100 103 { 101 104 Assert(hThread == NIL_RTTHREAD); 102 return vbi_is_preempt_enabled() != 0; 105 if ( vbi_is_preempt_enabled() 106 && ASMIntAreEnabled()) 107 return true; 108 return false; 103 109 } 104 110 … … 107 113 { 108 114 Assert(hThread == NIL_RTTHREAD); 109 /** @todo Review this! */110 115 return !!vbi_is_preempt_pending(); 111 116 } … … 115 120 { 116 121 /* yes, RTThreadPreemptIsPending is reliable. */ 122 return true; 123 } 124 125 126 RTDECL(bool) RTThreadPreemptIsPossible(void) 127 { 128 /* yes, kernel preemption is possible. */ 117 129 return true; 118 130 } … … 136 148 } 137 149 150 151 RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread) 152 { 153 Assert(hThread == NIL_RTTHREAD); NOREF(hThread); 154 /** @todo Solaris: Implement RTThreadIsInInterrupt. Required for guest 155 * additions! */ 156 return !ASMIntAreEnabled(); 157 } 158
Note:
See TracChangeset
for help on using the changeset viewer.