Changeset 48182 in vbox for trunk/src/VBox
- Timestamp:
- Aug 30, 2013 9:30:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c
r48168 r48182 125 125 126 126 /** 127 * Callback wrapper for specific timers if they happened to have been fired on 128 * the wrong CPU. See rtTimerSolCallbackWrapper(). 129 * 130 * @param idCpu The CPU this is fired on. 131 * @param pvUser1 Opaque pointer to the timer. 132 * @param pvUser2 Not used, NULL. 133 */ 134 static void rtTimerSolMpCallbackWrapper(RTCPUID idCpu, void *pvUser1, void *pvUser2) 135 { 136 PRTTIMER pTimer = (PRTTIMER)pvUser1; 137 AssertPtrReturnVoid(pTimer); 138 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 139 Assert(pTimer->iCpu == RTMpCpuId()); /* ASSUMES: index == cpuid */ 140 Assert(pTimer->pSingleTimer); 141 NOREF(pvUser2); 142 143 if ( pTimer->fSuspended 144 && pTimer->interval == 0) 145 return; 146 147 /* For one-shot specific timers, allow RTTimer to restart them. */ 148 /** @todo cyclic_reprogram() to CY_INFINITY? */ 149 if (pTimer->interval == 0) 150 pTimer->fSuspended = true; 151 152 uint64_t u64Tick = ++pTimer->pSingleTimer->u64Tick; 153 pTimer->pfnTimer(pTimer, pTimer->pvUser, u64Tick); 154 } 155 156 157 /** 127 158 * Callback wrapper for Omni-CPU and single-CPU timers. 128 159 * … … 139 170 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 140 171 141 if (pTimer->fSuspended)142 return;143 144 172 if (pTimer->pSingleTimer) 145 173 { 146 /* For specific periodic timers, we might fire on the wrong CPU between cyclic_add() and cyclic_bind(). 147 Ignore these shots while we are temporarily rebinding to the right CPU. */ 174 if ( pTimer->fSuspended 175 && pTimer->interval == 0) 176 return; 177 178 /* For specific timers, we might fire on the wrong CPU between cyclic_add() and cyclic_bind(). 179 Redirect these shots to the right CPU as we are temporarily rebinding to the right CPU. */ 148 180 if ( pTimer->fSpecificCpu 149 && pTimer->interval != 0150 181 && pTimer->iCpu != RTMpCpuId()) /* ASSUMES: index == cpuid */ 151 182 { 183 RTMpOnSpecific(pTimer->iCpu, rtTimerSolMpCallbackWrapper, pTimer, NULL); 152 184 return; 153 185 } 154 186 155 /* Allow RTTimer to be restarted for one-shot timers. */ 187 /* For one-shot any-cpu timers, allow RTTimer to restart them. */ 188 /** @todo cyclic_reprogram() to CY_INFINITY? */ 156 189 if (pTimer->interval == 0) 157 190 pTimer->fSuspended = true; 191 158 192 uint64_t u64Tick = ++pTimer->pSingleTimer->u64Tick; 159 193 pTimer->pfnTimer(pTimer, pTimer->pvUser, u64Tick); … … 221 255 /* One-shot omni timers are not supported by the cyclic system. */ 222 256 if ( (fFlags & RTTIMER_FLAGS_CPU_ALL) == RTTIMER_FLAGS_CPU_ALL 223 && u64NanoInterval == 0)224 {225 return VERR_NOT_SUPPORTED;226 }227 228 /* One-shot specific timers are not supported. See rtTimerSolCallbackWrapper(). */229 if ( (fFlags & RTTIMER_FLAGS_CPU_ALL) != RTTIMER_FLAGS_CPU_ALL230 && (fFlags & RTTIMER_FLAGS_CPU_SPECIFIC)231 257 && u64NanoInterval == 0) 232 258 {
Note:
See TracChangeset
for help on using the changeset viewer.