Changeset 54184 in vbox for trunk/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c
- Timestamp:
- Feb 12, 2015 8:58:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c
r54183 r54184 46 46 #include "internal/magics.h" 47 47 48 #define SOL_TIMER_ANY_CPU (-1)49 48 50 49 /******************************************************************************* … … 69 68 uint8_t fSpecificCpu; 70 69 /** The CPU it must run on if fSpecificCpu is set. */ 71 uint 8_tiCpu;70 uint32_t iCpu; 72 71 /** The nano second interval for repeating timers. */ 73 72 uint64_t cNsInterval; … … 323 322 pTimer->fAllCpus = true; 324 323 pTimer->fSpecificCpu = false; 325 pTimer->iCpu = 255;324 pTimer->iCpu = UINT32_MAX; 326 325 } 327 326 else if (fFlags & RTTIMER_FLAGS_CPU_SPECIFIC) … … 335 334 pTimer->fAllCpus = false; 336 335 pTimer->fSpecificCpu = false; 337 pTimer->iCpu = 255;336 pTimer->iCpu = UINT32_MAX; 338 337 } 339 338 pTimer->cNsInterval = u64NanoInterval; … … 393 392 else 394 393 { 395 int iCpu = SOL_TIMER_ANY_CPU; 396 if (pTimer->fSpecificCpu) 397 { 398 iCpu = pTimer->iCpu; 399 if (!RTMpIsCpuOnline(iCpu)) /* ASSUMES: index == cpuid */ 400 return VERR_CPU_OFFLINE; 401 } 394 if (pTimer->fSpecificCpu && !RTMpIsCpuOnline(pTimer->iCpu)) /* ASSUMES: index == cpuid */ 395 return VERR_CPU_OFFLINE; 402 396 403 397 pTimer->u.Single.hHandler.cyh_func = (cyc_func_t)rtTimerSolSingleCallbackWrapper; … … 406 400 407 401 mutex_enter(&cpu_lock); 408 if (RT_UNLIKELY( iCpu != SOL_TIMER_ANY_CPU409 && !cpu_is_online(cpu[ iCpu])))402 if (RT_UNLIKELY( pTimer->fSpecificCpu 403 && !cpu_is_online(cpu[pTimer->iCpu]))) 410 404 { 411 405 mutex_exit(&cpu_lock); … … 427 421 428 422 pTimer->hCyclicId = cyclic_add(&pTimer->u.Single.hHandler, &pTimer->u.Single.hFireTime); 429 if ( iCpu != SOL_TIMER_ANY_CPU)430 cyclic_bind(pTimer->hCyclicId, cpu[ iCpu], NULL /* cpupart */);423 if (pTimer->fSpecificCpu) 424 cyclic_bind(pTimer->hCyclicId, cpu[pTimer->iCpu], NULL /* cpupart */); 431 425 432 426 mutex_exit(&cpu_lock);
Note:
See TracChangeset
for help on using the changeset viewer.