Changeset 22073 in vbox
- Timestamp:
- Aug 7, 2009 3:26:56 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50819
- Location:
- trunk/src/VBox/Runtime/r0drv/solaris
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c
-
Property svn:keywords
set to
Author Date Id Revision
r21292 r22073 29 29 */ 30 30 31 32 /******************************************************************************* 33 * Header Files * 34 *******************************************************************************/ 31 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 32 37 #include <iprt/log.h> 38 33 39 #include <iprt/assert.h> 40 34 41 35 42 -
Property svn:keywords
set to
-
trunk/src/VBox/Runtime/r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c
r19501 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 36 37 #include <iprt/mp.h> 38 39 #include <iprt/asm.h> 37 40 #include <iprt/err.h> 38 41 … … 41 44 RTDECL(int) RTMpPokeCpu(RTCPUID idCpu) 42 45 { 46 RT_ASSERT_INTS_ON(); 43 47 if (idCpu >= RTMpGetCount()) 44 48 return VERR_CPU_NOT_FOUND; -
trunk/src/VBox/Runtime/r0drv/solaris/alloc-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8245 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/mem.h> 36 38 37 #include <iprt/alloc.h>38 39 #include <iprt/assert.h> 39 #include <iprt/types.h>40 40 #include <iprt/param.h> 41 #include <iprt/thread.h> 41 42 #include "r0drv/alloc-r0drv.h" 42 43 … … 93 94 AssertPtr(pPhys); 94 95 Assert(cb > 0); 96 RT_ASSERT_PREEMPTIBLE(); 95 97 96 98 /* Allocate physically contiguous page-aligned memory. */ … … 108 110 { 109 111 NOREF(cb); 112 RT_ASSERT_PREEMPTIBLE(); 110 113 if (pv) 111 114 i_ddi_mem_free(pv, NULL); -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r13314 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/assert.h> 36 38 37 #include <iprt/as sert.h>39 #include <iprt/asm.h> 38 40 #include <iprt/log.h> 41 #include <iprt/stdarg.h> 39 42 #include <iprt/string.h> 40 #include <iprt/stdarg.h>41 #include <iprt/asm.h>42 43 43 44 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8245 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 36 38 #include <iprt/err.h> 37 #include <iprt/assert.h>38 39 #include "internal/initterm.h" 39 40 40 41 /*******************************************************************************42 * Internal Functions *43 *******************************************************************************/44 41 45 42 … … 53 50 { 54 51 } 52 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r21621 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 36 #include "internal/iprt.h" 37 37 #include <iprt/memobj.h> 38 39 #include <iprt/assert.h> 40 #include <iprt/err.h> 41 #include <iprt/log.h> 38 42 #include <iprt/mem.h> 39 #include <iprt/err.h>40 #include <iprt/assert.h>41 #include <iprt/log.h>42 43 #include <iprt/param.h> 43 44 #include <iprt/process.h> … … 61 62 } RTR0MEMOBJSOLARIS, *PRTR0MEMOBJSOLARIS; 62 63 64 65 /******************************************************************************* 66 * Global Variables * 67 *******************************************************************************/ 63 68 /** 64 69 * Used for supplying the solaris kernel info. about memory limits … … 80 85 0 /* bus-specific flags */ 81 86 }; 87 82 88 83 89 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/memuserkernel-r0drv-solaris.c
r21284 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/mem.h> 36 38 37 #include <iprt/mem.h> 39 #include <iprt/asm.h> 40 #include <iprt/assert.h> 38 41 #include <iprt/err.h> 39 42 … … 41 44 RTR0DECL(int) RTR0MemUserCopyFrom(void *pvDst, RTR3PTR R3PtrSrc, size_t cb) 42 45 { 43 int rc = ddi_copyin((const char *)R3PtrSrc, pvDst, cb, 0 /*flags*/); 46 int rc; 47 RT_ASSERT_INTS_ON(); 48 49 rc = ddi_copyin((const char *)R3PtrSrc, pvDst, cb, 0 /*flags*/); 44 50 if (RT_LIKELY(rc == 0)) 45 51 return VINF_SUCCESS; … … 50 56 RTR0DECL(int) RTR0MemUserCopyTo(RTR3PTR R3PtrDst, void const *pvSrc, size_t cb) 51 57 { 52 int rc = ddi_copyout(pvSrc, (void *)R3PtrDst, cb, 0 /*flags*/); 58 int rc; 59 RT_ASSERT_INTS_ON(); 60 61 rc = ddi_copyout(pvSrc, (void *)R3PtrDst, cb, 0 /*flags*/); 53 62 if (RT_LIKELY(rc == 0)) 54 63 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/solaris/mp-r0drv-solaris.c
r19391 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 36 #include "internal/iprt.h" 37 37 #include <iprt/mp.h> 38 39 #include <iprt/asm.h> 38 40 #include <iprt/cpuset.h> 39 41 #include <iprt/err.h> 40 #include <iprt/asm.h>41 42 #include "r0drv/mp-r0drv.h" 43 42 44 43 45 … … 156 158 cpuset_t Set; 157 159 RTMPARGS Args; 160 RT_ASSERT_INTS_ON(); 158 161 159 162 Args.pfnWorker = pfnWorker; … … 201 204 cpuset_t Set; 202 205 RTMPARGS Args; 203 204 /* The caller should disable preemption, but take no chances.*/ 206 RT_ASSERT_INTS_ON(); 207 208 /* The caller should disable preemption, but take no chances. */ 205 209 kpreempt_disable(); 206 210 … … 249 253 cpuset_t Set; 250 254 RTMPARGS Args; 255 RT_ASSERT_INTS_ON(); 251 256 252 257 if (idCpu >= NCPU) -
trunk/src/VBox/Runtime/r0drv/solaris/mpnotification-r0drv-solaris.c
r11982 r22073 29 29 */ 30 30 31 31 32 /******************************************************************************* 32 33 * Header Files * 33 34 *******************************************************************************/ 34 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/mp.h> 35 38 36 #include <iprt/err.h>37 #include <iprt/mp.h>38 39 #include <iprt/err.h> 39 40 #include "r0drv/mp-r0drv.h" -
trunk/src/VBox/Runtime/r0drv/solaris/process-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r19338 r22073 33 33 *******************************************************************************/ 34 34 #include "the-solaris-kernel.h" 35 35 #include "internal/iprt.h" 36 36 #include <iprt/process.h> 37 37 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r22052 r22073 37 37 #include <iprt/semaphore.h> 38 38 39 #include <iprt/alloc.h>40 39 #include <iprt/assert.h> 41 40 #include <iprt/asm.h> 42 41 #include <iprt/err.h> 42 #include <iprt/mem.h> 43 43 #include <iprt/mp.h> 44 44 #include <iprt/thread.h> … … 69 69 70 70 71 71 72 RTDECL(int) RTSemEventCreate(PRTSEMEVENT pEventSem) 72 73 { 73 74 Assert(sizeof(RTSEMEVENTINTERNAL) > sizeof(void *)); 74 75 AssertPtrReturn(pEventSem, VERR_INVALID_POINTER); 76 RT_ASSERT_PREEMPTIBLE(); 75 77 76 78 PRTSEMEVENTINTERNAL pEventInt = (PRTSEMEVENTINTERNAL)RTMemAlloc(sizeof(*pEventInt)); … … 163 165 ("pEventInt=%p u32Magic=%#x\n", pEventInt, pEventInt->u32Magic), 164 166 VERR_INVALID_HANDLE); 165 RT_ASSERT_PREEMPTIBLE(); 167 if (cMillies) 168 RT_ASSERT_PREEMPTIBLE(); 166 169 167 170 mutex_enter(&pEventInt->Mtx); … … 173 176 rc = VINF_SUCCESS; 174 177 } 178 else if (!cMillies) 179 rc = VERR_TIMEOUT; 175 180 else 176 181 { -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r20793 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 36 #include "internal/iprt.h" 37 37 #include <iprt/semaphore.h> 38 #include <iprt/alloc.h> 38 39 #include <iprt/assert.h> 39 40 #include <iprt/asm.h> 40 #include <iprt/assert.h>41 41 #include <iprt/err.h> 42 42 #include <iprt/mem.h> 43 #include <iprt/mp.h> 44 #include <iprt/thread.h> 43 45 #include "internal/magics.h" 44 46 … … 67 69 68 70 71 69 72 RTDECL(int) RTSemEventMultiCreate(PRTSEMEVENTMULTI pEventMultiSem) 70 73 { 71 74 Assert(sizeof(RTSEMEVENTMULTIINTERNAL) > sizeof(void *)); 72 75 AssertPtrReturn(pEventMultiSem, VERR_INVALID_POINTER); 76 RT_ASSERT_PREEMPTIBLE(); 73 77 74 78 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)RTMemAlloc(sizeof(*pThis)); … … 97 101 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 98 102 VERR_INVALID_HANDLE); 103 RT_ASSERT_INTS_ON(); 99 104 100 105 mutex_enter(&pThis->Mtx); … … 125 130 { 126 131 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)EventMultiSem; 127 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 128 AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, 129 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 130 VERR_INVALID_HANDLE); 132 RT_ASSERT_PREEMPT_CPUID_VAR(); 133 134 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 135 AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, 136 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 137 VERR_INVALID_HANDLE); 138 RT_ASSERT_INTS_ON(); 131 139 132 140 mutex_enter(&pThis->Mtx); … … 141 149 142 150 mutex_exit(&pThis->Mtx); 151 152 RT_ASSERT_PREEMPT_CPUID(); 143 153 return VINF_SUCCESS; 144 154 } … … 148 158 { 149 159 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)EventMultiSem; 150 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 151 AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, 152 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 153 VERR_INVALID_HANDLE); 160 RT_ASSERT_PREEMPT_CPUID_VAR(); 161 162 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 163 AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, 164 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 165 VERR_INVALID_HANDLE); 166 RT_ASSERT_INTS_ON(); 154 167 155 168 mutex_enter(&pThis->Mtx); 156 169 ASMAtomicXchgU8(&pThis->fSignaled, false); 157 170 mutex_exit(&pThis->Mtx); 171 172 RT_ASSERT_PREEMPT_CPUID(); 158 173 return VINF_SUCCESS; 159 174 } … … 168 183 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 169 184 VERR_INVALID_HANDLE); 185 if (cMillies) 186 RT_ASSERT_PREEMPTIBLE(); 170 187 171 188 mutex_enter(&pThis->Mtx); … … 173 190 if (pThis->fSignaled) 174 191 rc = VINF_SUCCESS; 192 else if (!cMillies) 193 rc = VERR_TIMEOUT; 175 194 else 176 195 { -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/semfastmutex-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r16200 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/semaphore.h> 36 38 37 #include <iprt/semaphore.h> 39 #include <iprt/asm.h> 40 #include <iprt/assert.h> 38 41 #include <iprt/err.h> 39 #include <iprt/alloc.h> 40 #include <iprt/assert.h> 41 #include <iprt/asm.h> 42 42 #include <iprt/mem.h> 43 #include <iprt/thread.h> 43 44 #include "internal/magics.h" 44 45 … … 59 60 60 61 62 61 63 RTDECL(int) RTSemFastMutexCreate(PRTSEMFASTMUTEX pMutexSem) 62 64 { 63 65 AssertCompile(sizeof(RTSEMFASTMUTEXINTERNAL) > sizeof(void *)); 64 66 AssertPtrReturn(pMutexSem, VERR_INVALID_POINTER); 67 RT_ASSERT_PREEMPTIBLE(); 65 68 66 69 PRTSEMFASTMUTEXINTERNAL pFastInt = (PRTSEMFASTMUTEXINTERNAL)RTMemAlloc(sizeof(*pFastInt)); … … 85 88 ("pFastInt->u32Magic=%RX32 pFastInt=%p\n", pFastInt->u32Magic, pFastInt), 86 89 VERR_INVALID_PARAMETER); 90 RT_ASSERT_INTS_ON(); 87 91 88 92 ASMAtomicXchgU32(&pFastInt->u32Magic, RTSEMFASTMUTEX_MAGIC_DEAD); … … 101 105 ("pFastInt->u32Magic=%RX32 pFastInt=%p\n", pFastInt->u32Magic, pFastInt), 102 106 VERR_INVALID_PARAMETER); 107 RT_ASSERT_PREEMPTIBLE(); 103 108 104 109 rw_enter(&pFastInt->Mtx, RW_WRITER); … … 114 119 ("pFastInt->u32Magic=%RX32 pFastInt=%p\n", pFastInt->u32Magic, pFastInt), 115 120 VERR_INVALID_PARAMETER); 121 RT_ASSERT_INTS_ON(); 116 122 117 123 rw_exit(&pFastInt->Mtx); -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r20793 r22073 29 29 */ 30 30 31 31 32 /******************************************************************************* 32 33 * Header Files * 33 34 *******************************************************************************/ 34 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/spinlock.h> 35 38 36 #include <iprt/spinlock.h> 39 #include <iprt/asm.h> 40 #include <iprt/assert.h> 37 41 #include <iprt/err.h> 38 #include <iprt/alloc.h> 39 #include <iprt/assert.h> 40 #include <iprt/asm.h> 41 42 #include <iprt/mem.h> 43 #include <iprt/thread.h> 42 44 #include "internal/magics.h" 43 45 … … 58 60 59 61 62 60 63 RTDECL(int) RTSpinlockCreate(PRTSPINLOCK pSpinlock) 61 64 { … … 63 66 * Allocate. 64 67 */ 68 RT_ASSERT_PREEMPTIBLE(); 65 69 AssertCompile(sizeof(RTSPINLOCKINTERNAL) > sizeof(void *)); 66 70 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)RTMemAlloc(sizeof(*pSpinlockInt)); … … 83 87 * Validate input. 84 88 */ 89 RT_ASSERT_INTS_ON(); 85 90 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)Spinlock; 86 91 if (!pSpinlockInt) … … 107 112 NOREF(pTmp); 108 113 114 /** @todo r=bird: are interrupts disabled implicitly by mutex_enter?!? */ 109 115 mutex_enter(&pSpinlockInt->Mtx); 110 116 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r21595 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/thread.h> 36 38 37 #include <iprt/thread.h>38 39 #include <iprt/asm.h> 39 40 #include <iprt/assert.h> 40 41 #include <iprt/err.h> 42 41 43 42 44 … … 51 53 clock_t cTicks; 52 54 unsigned long timeout; 55 RT_ASSERT_PREEMPTIBLE(); 53 56 54 57 if (!cMillies) … … 96 99 RTDECL(bool) RTThreadYield(void) 97 100 { 98 schedctl_set_yield(curthread, 0); 101 RT_ASSERT_PREEMPTIBLE(); 102 schedctl_set_yield(curthread, 0); /** @todo this is incomplete/wrong. */ 99 103 return true; 100 104 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r19355 r22073 29 29 */ 30 30 31 31 32 /******************************************************************************* 32 33 * Header Files * 33 34 *******************************************************************************/ 34 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/thread.h> 35 38 36 39 #include <iprt/assert.h> 37 40 #include <iprt/err.h> 38 #include <iprt/thread.h>39 41 #include <iprt/process.h> 42 #include "internal/thread.h" 40 43 41 #include "internal/thread.h" 44 42 45 43 46 int rtThreadNativeInit(void) … … 102 105 int rtThreadNativeCreate(PRTTHREADINT pThreadInt, PRTNATIVETHREAD pNativeThread) 103 106 { 104 int rc; 105 kthread_t* pKernThread = thread_create(NULL, NULL, rtThreadNativeMain, pThreadInt, 0, 106 (void *)RTR0ProcHandleSelf(), TS_RUN, minclsyspri); 107 kthread_t *pKernThread; 108 RT_ASSERT_PREEMPTIBLE(); 109 110 pKernThread = thread_create(NULL, NULL, rtThreadNativeMain, pThreadInt, 0, 111 (void *)RTR0ProcHandleSelf(), TS_RUN, minclsyspri); 107 112 if (pKernThread) 108 113 { 109 *pNativeThread = (RTNATIVETHREAD)p KernThread;114 *pNativeThread = (RTNATIVETHREAD)pvKernThread; 110 115 return VINF_SUCCESS; 111 116 } 112 117 113 return RTErrConvertFromErrno(rc);118 return VERR_OUT_OF_RESOURCES; 114 119 } 115 120 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/time-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8245 r22073 33 33 * Header Files * 34 34 *******************************************************************************/ 35 #define RTTIME_INCL_TIMESPEC 35 36 #include "the-solaris-kernel.h" 36 #define RTTIME_INCL_TIMESPEC 37 #include "internal/iprt.h" 38 #include <iprt/time.h> 37 39 38 #include <iprt/time.h>39 40 40 41 … … 69 70 return RTTimeSpecSetNano(pTime, (uint64_t)tv.tv_sec * 1000000000 + tv.tv_nsec); 70 71 } 72 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r9557 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 36 #include "internal/iprt.h" 37 37 #include <iprt/timer.h> 38 #include <iprt/time.h> 38 39 #include <iprt/asm.h> 40 #include <iprt/assert.h> 41 #include <iprt/err.h> 42 #include <iprt/mem.h> 39 43 #include <iprt/mp.h> 40 44 #include <iprt/spinlock.h> 41 #include <iprt/err.h> 42 #include <iprt/asm.h> 43 #include <iprt/assert.h> 44 #include <iprt/alloc.h> 45 45 #include <iprt/thread.h> 46 #include <iprt/time.h> 46 47 #include "internal/magics.h" 47 48 … … 142 143 * Validate flags. 143 144 */ 145 RT_ASSERT_PREEMPTIBLE(); 144 146 if (!RTTIMER_FLAGS_ARE_VALID(fFlags)) 145 147 return VERR_INVALID_PARAMETER; … … 196 198 * Validate. 197 199 */ 200 RT_ASSERT_PREEMPTIBLE(); 198 201 if (pTimer == NULL) 199 202 return VINF_SUCCESS; 200 203 AssertPtrReturn(pTimer, VERR_INVALID_HANDLE); 201 204 AssertReturn(pTimer->u32Magic == RTTIMER_MAGIC, VERR_INVALID_HANDLE); 205 RT_ASSERT_INTS_ON(); 202 206 203 207 /* … … 225 229 AssertPtrReturn(pTimer, VERR_INVALID_HANDLE); 226 230 AssertReturn(pTimer->u32Magic == RTTIMER_MAGIC, VERR_INVALID_HANDLE); 231 RT_ASSERT_INTS_ON(); 227 232 if (rtTimerSolarisGetCyclicId(pTimer) != CYCLIC_NONE) 228 233 { … … 324 329 AssertPtrReturn(pTimer, VERR_INVALID_HANDLE); 325 330 AssertReturn(pTimer->u32Magic == RTTIMER_MAGIC, VERR_INVALID_HANDLE); 331 RT_ASSERT_INTS_ON(); 326 332 327 333 /* -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/RTLogWriteDebugger-r0drv-solaris.c
-
Property svn:keywords
set to
Author Date Id Revision
r21292 r22073 29 29 */ 30 30 31 32 /******************************************************************************* 33 * Header Files * 34 *******************************************************************************/ 31 35 #include "the-solaris-kernel.h" 32 36 #include <iprt/log.h> 37 33 38 #include <iprt/assert.h> 34 39 -
Property svn:keywords
set to
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/RTMpPokeCpu-r0drv-solaris.c
r19501 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 36 37 #include <iprt/mp.h> 38 39 #include <iprt/asm.h> 37 40 #include <iprt/err.h> 38 41 … … 41 44 RTDECL(int) RTMpPokeCpu(RTCPUID idCpu) 42 45 { 46 RT_ASSERT_INTS_ON(); 43 47 vbi_poke_cpu(idCpu); 44 48 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/alloc-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r9149 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/mem.h> 36 38 37 #include <iprt/alloc.h>38 39 #include <iprt/assert.h> 39 #include <iprt/types.h>40 40 #include <iprt/param.h> 41 #include <iprt/thread.h> 41 42 #include "r0drv/alloc-r0drv.h" 43 42 44 43 45 … … 93 95 AssertPtr(pPhys); 94 96 Assert(cb > 0); 97 RT_ASSERT_PREEMPTIBLE(); 95 98 96 99 /* Allocate physically contiguous page-aligned memory. */ … … 111 114 RTR0DECL(void) RTMemContFree(void *pv, size_t cb) 112 115 { 116 RT_ASSERT_PREEMPTIBLE(); 113 117 if (pv) 114 118 vbi_contig_free(pv, cb); -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/memobj-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r21633 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 36 #include "internal/iprt.h" 37 37 #include <iprt/memobj.h> 38 39 #include <iprt/assert.h> 40 #include <iprt/err.h> 41 #include <iprt/log.h> 38 42 #include <iprt/mem.h> 39 #include <iprt/err.h>40 #include <iprt/assert.h>41 #include <iprt/log.h>42 43 #include <iprt/param.h> 43 44 #include <iprt/process.h> … … 326 327 cmn_err(CE_NOTE, "rtR0MemObjNativeMapUser: no page to map.\n"); 327 328 rc = VERR_MAP_FAILED; 328 goto done;329 goto l_done; 329 330 } 330 331 pv = (void *)((uintptr_t)pv + PAGE_SIZE); … … 337 338 rc = VERR_MAP_FAILED; 338 339 rtR0MemObjDelete(&pMemSolaris->Core); 339 goto done;340 goto l_done; 340 341 } 341 342 else … … 345 346 pMemSolaris->Core.pv = addr; 346 347 *ppMem = &pMemSolaris->Core; 347 done:348 l_done: 348 349 kmem_free(paddrs, sizeof(uint64_t) * cPages); 349 350 return rc; -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/mp-r0drv-solaris.c
r19391 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 36 #include "internal/iprt.h" 37 37 #include <iprt/mp.h> 38 39 #include <iprt/asm.h> 38 40 #include <iprt/cpuset.h> 39 41 #include <iprt/err.h> 40 #include <iprt/asm.h>41 42 #include "r0drv/mp-r0drv.h" 43 42 44 43 45 … … 160 162 { 161 163 RTMPARGS Args; 164 RT_ASSERT_INTS_ON(); 162 165 163 166 Args.pfnWorker = pfnWorker; … … 203 206 int rc; 204 207 RTMPARGS Args; 208 RT_ASSERT_INTS_ON(); 205 209 206 210 /* The caller is supposed to have disabled preemption, but take no chances. */ … … 249 253 int rc; 250 254 RTMPARGS Args; 255 RT_ASSERT_INTS_ON(); 251 256 252 257 if (idCpu >= vbi_cpu_count()) -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/mpnotification-r0drv-solaris.c
r11982 r22073 33 33 *******************************************************************************/ 34 34 #include "the-solaris-kernel.h" 35 #include "internal/iprt.h" 35 36 37 #include <iprt/err.h> 36 38 #include <iprt/mp.h> 37 #include <iprt/err.h>38 39 #include "r0drv/mp-r0drv.h" 40 41 42 /******************************************************************************* 43 * Global Variables * 44 *******************************************************************************/ 45 static vbi_cpu_watch_t *g_hVbiCpuWatch = NULL; 39 46 40 47 … … 50 57 } 51 58 52 static vbi_cpu_watch_t *watch_handle = NULL;53 59 54 60 int rtR0MpNotificationNativeInit(void) … … 56 62 if (vbi_revision_level < 2) 57 63 return VERR_NOT_SUPPORTED; 58 if ( watch_handle!= NULL)59 return VERR_ INVALID_PARAMETER;60 watch_handle= vbi_watch_cpus(rtMpNotificationSolarisCallback, NULL, 0);64 if (g_hVbiCpuWatch != NULL) 65 return VERR_WRONG_ORDER; 66 g_hVbiCpuWatch = vbi_watch_cpus(rtMpNotificationSolarisCallback, NULL, 0); 61 67 return VINF_SUCCESS; 62 68 } … … 65 71 void rtR0MpNotificationNativeTerm(void) 66 72 { 67 if (vbi_revision_level >= 2 && watch_handle!= NULL)68 vbi_ignore_cpus( watch_handle);69 watch_handle= NULL;73 if (vbi_revision_level >= 2 && g_hVbiCpuWatch != NULL) 74 vbi_ignore_cpus(g_hVbiCpuWatch); 75 g_hVbiCpuWatch = NULL; 70 76 } 71 77 -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/process-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r9149 r22073 29 29 */ 30 30 31 31 32 /******************************************************************************* 32 33 * Header Files * 33 34 *******************************************************************************/ 34 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/process.h> 35 38 36 #include <iprt/process.h>37 39 38 40 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r21595 r22073 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/thread.h> 36 38 37 #include <iprt/thread.h>38 39 #include <iprt/asm.h> 39 40 #include <iprt/assert.h> 40 41 #include <iprt/err.h> 42 41 43 42 44 … … 51 53 clock_t cTicks; 52 54 unsigned long timeout; 55 RT_ASSERT_PREEMPTIBLE(); 53 56 54 57 if (!cMillies) … … 96 99 RTDECL(bool) RTThreadYield(void) 97 100 { 101 RT_ASSERT_PREEMPTIBLE(); 98 102 return vbi_yield(); 99 103 } -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread2-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r9149 r22073 29 29 */ 30 30 31 31 32 /******************************************************************************* 32 33 * Header Files * 33 34 *******************************************************************************/ 34 35 #include "the-solaris-kernel.h" 36 #include "internal/iprt.h" 37 #include <iprt/thread.h> 35 38 36 39 #include <iprt/assert.h> 37 40 #include <iprt/err.h> 38 #include <iprt/thread.h>41 #include "internal/thread.h" 39 42 40 #include "internal/thread.h" 43 41 44 42 45 int rtThreadNativeInit(void) … … 90 93 { 91 94 PRTTHREADINT pThreadInt = (PRTTHREADINT)pvThreadInt; 92 int rc;93 95 94 r c = rtThreadMain(pThreadInt, (RTNATIVETHREAD)vbi_curthread(), &pThreadInt->szName[0]);96 rtThreadMain(pThreadInt, (RTNATIVETHREAD)vbi_curthread(), &pThreadInt->szName[0]); 95 97 vbi_thread_exit(); 96 98 } … … 99 101 int rtThreadNativeCreate(PRTTHREADINT pThreadInt, PRTNATIVETHREAD pNativeThread) 100 102 { 101 int rc; 102 void *pKernThread = vbi_thread_create(rtThreadNativeMain, pThreadInt, 103 sizeof (pThreadInt), minclsyspri); 104 if (pKernThread) 103 void *pvKernThread; 104 RT_ASSERT_PREEMPTIBLE(); 105 106 pvKernThread = vbi_thread_create(rtThreadNativeMain, pThreadInt, sizeof(pThreadInt), minclsyspri); 107 if (pvKernThread) 105 108 { 106 *pNativeThread = (RTNATIVETHREAD)p KernThread;109 *pNativeThread = (RTNATIVETHREAD)pvKernThread; 107 110 return VINF_SUCCESS; 108 111 } 109 112 110 return RTErrConvertFromErrno(rc);113 return VERR_OUT_OF_RESOURCES; 111 114 } 112 115 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/time-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r9149 r22073 33 33 * Header Files * 34 34 *******************************************************************************/ 35 #define RTTIME_INCL_TIMESPEC 35 36 #include "the-solaris-kernel.h" 36 #define RTTIME_INCL_TIMESPEC 37 37 #include "internal/iprt.h" 38 38 #include <iprt/time.h> 39 39 … … 67 67 return RTTimeSpecSetNano(pTime, vbi_tod()); 68 68 } 69 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/timer-r0drv-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r14318 r22073 1 /* *$Id$ */1 /* $Id$ */ 2 2 /** @file 3 3 * IPRT - Timer, Ring-0 Driver, Solaris. … … 34 34 *******************************************************************************/ 35 35 #include "the-solaris-kernel.h" 36 36 #include "internal/iprt.h" 37 37 #include <iprt/timer.h> 38 #include <iprt/time.h> 38 39 #include <iprt/asm.h> 40 #include <iprt/assert.h> 41 #include <iprt/err.h> 42 #include <iprt/mem.h> 39 43 #include <iprt/mp.h> 40 44 #include <iprt/spinlock.h> 41 #include <iprt/err.h> 42 #include <iprt/asm.h> 43 #include <iprt/assert.h> 44 #include <iprt/alloc.h> 45 45 #include <iprt/time.h> 46 #include <iprt/thread.h> 46 47 #include "internal/magics.h" 47 48 … … 70 71 uint64_t interval; 71 72 /** simple Solaris timer handle. */ 72 vbi_stimer_t 73 vbi_stimer_t *stimer; 73 74 /** global Solaris timer handle. */ 74 vbi_gtimer_t 75 vbi_gtimer_t *gtimer; 75 76 /** The user callback. */ 76 77 PFNRTTIMER pfnTimer; 77 78 /** The argument for the user callback. */ 78 void 79 void *pvUser; 79 80 } RTTIMER; 81 82 83 /******************************************************************************* 84 * Defined Constants And Macros * 85 *******************************************************************************/ 86 /** Validates that the timer is valid. */ 87 #define RTTIMER_ASSERT_VALID_RET(pTimer) \ 88 do \ 89 { \ 90 AssertPtrReturn(pTimer, VERR_INVALID_HANDLE); \ 91 AssertReturn((pTimer)->u32Magic == RTTIMER_MAGIC, VERR_INVALID_HANDLE); \ 92 } while (0) 80 93 81 94 … … 93 106 RTDECL(int) RTTimerCreateEx(PRTTIMER *ppTimer, uint64_t u64NanoInterval, unsigned fFlags, PFNRTTIMER pfnTimer, void *pvUser) 94 107 { 108 RT_ASSERT_PREEMPTIBLE(); 95 109 *ppTimer = NULL; 96 110 … … 149 163 150 164 151 /**152 * Validates the timer handle.153 *154 * @returns true if valid, false if invalid.155 * @param pTimer The handle.156 */157 DECLINLINE(bool) rtTimerIsValid(PRTTIMER pTimer)158 {159 AssertReturn(VALID_PTR(pTimer), false);160 AssertReturn(pTimer->u32Magic == RTTIMER_MAGIC, false);161 return true;162 }163 164 165 165 RTDECL(int) RTTimerDestroy(PRTTIMER pTimer) 166 166 { 167 167 if (pTimer == NULL) 168 168 return VINF_SUCCESS; 169 if (!rtTimerIsValid(pTimer))170 return VERR_INVALID_HANDLE;169 RTTIMER_ASSERT_VALID_RET(pTimer); 170 RT_ASSERT_INTS_ON(); 171 171 172 172 /* … … 174 174 */ 175 175 RTTimerStop(pTimer); 176 pTimer->u32Magic++;176 ASMAtomicWriteU32(pTimer, ~RTTIMER_MAGIC); 177 177 RTMemFree(pTimer); 178 178 return VINF_SUCCESS; … … 182 182 RTDECL(int) RTTimerStart(PRTTIMER pTimer, uint64_t u64First) 183 183 { 184 int cpu = VBI_ANY_CPU; 185 186 if (!rtTimerIsValid(pTimer)) 187 return VERR_INVALID_HANDLE; 184 RTTIMER_ASSERT_VALID_RET(pTimer); 185 RT_ASSERT_INTS_ON(); 186 188 187 if (!pTimer->fSuspended) 189 188 return VERR_TIMER_ACTIVE; … … 198 197 else 199 198 { 199 int cpu = VBI_ANY_CPU; 200 200 if (pTimer->fSpecificCpu) 201 201 cpu = pTimer->iCpu; … … 215 215 RTDECL(int) RTTimerStop(PRTTIMER pTimer) 216 216 { 217 if (!rtTimerIsValid(pTimer)) 218 return VERR_INVALID_HANDLE; 217 RTTIMER_ASSERT_VALID_RET(pTimer); 218 RT_ASSERT_INTS_ON(); 219 219 220 if (pTimer->fSuspended) 220 221 return VERR_TIMER_SUSPENDED; -
Property svn:keywords
changed from
Note:
See TracChangeset
for help on using the changeset viewer.