Changeset 57276 in vbox for trunk/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
- Timestamp:
- Aug 11, 2015 2:39:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
r56290 r57276 1186 1186 RTTIMERLINUXSTARTONCPUARGS Args; 1187 1187 int rc2; 1188 IPRT_LINUX_SAVE_EFL_AC(); 1188 1189 1189 1190 /* … … 1203 1204 */ 1204 1205 if (pTimer->fAllCpus) 1205 return rtTimerLnxOmniStart(pTimer, &Args); 1206 { 1207 rc2 = rtTimerLnxOmniStart(pTimer, &Args); 1208 IPRT_LINUX_RESTORE_EFL_AC(); 1209 return rc2; 1210 } 1206 1211 #endif 1207 1212 … … 1234 1239 } 1235 1240 } 1241 IPRT_LINUX_RESTORE_EFL_AC(); 1236 1242 return VINF_SUCCESS; 1237 1243 } … … 1243 1249 { 1244 1250 ASMAtomicWriteBool(&pTimer->fSuspended, false); 1251 IPRT_LINUX_RESTORE_EFL_AC(); 1245 1252 return VINF_SUCCESS; 1246 1253 } … … 1249 1256 default: 1250 1257 AssertMsgFailed(("%d\n", enmState)); 1258 IPRT_LINUX_RESTORE_EFL_AC(); 1251 1259 return VERR_INTERNAL_ERROR_4; 1252 1260 } … … 1329 1337 * Validate. 1330 1338 */ 1339 IPRT_LINUX_SAVE_EFL_AC(); 1331 1340 AssertPtrReturn(pTimer, VERR_INVALID_HANDLE); 1332 1341 AssertReturn(pTimer->u32Magic == RTTIMER_MAGIC, VERR_INVALID_HANDLE); … … 1337 1346 1338 1347 rtTimerLnxStop(pTimer, false /*fForDestroy*/); 1348 1349 IPRT_LINUX_RESTORE_EFL_AC(); 1339 1350 return VINF_SUCCESS; 1340 1351 } … … 1346 1357 unsigned long cJiffies; 1347 1358 unsigned long flFlags; 1359 IPRT_LINUX_SAVE_EFL_AC(); 1348 1360 1349 1361 /* … … 1365 1377 { 1366 1378 ASMAtomicWriteU64(&pTimer->u64NanoInterval, u64NanoInterval); 1379 IPRT_LINUX_RESTORE_EFL_AC(); 1367 1380 return VINF_SUCCESS; 1368 1381 } … … 1385 1398 ASMAtomicWriteU64(&pTimer->u64NanoInterval, u64NanoInterval); 1386 1399 spin_unlock_irqrestore(&pTimer->ChgIntLock, flFlags); 1400 IPRT_LINUX_RESTORE_EFL_AC(); 1387 1401 return VINF_SUCCESS; 1388 1402 } … … 1393 1407 { 1394 1408 bool fCanDestroy; 1409 IPRT_LINUX_SAVE_EFL_AC(); 1395 1410 1396 1411 /* … … 1460 1475 } 1461 1476 1477 IPRT_LINUX_RESTORE_EFL_AC(); 1462 1478 return VINF_SUCCESS; 1463 1479 } … … 1471 1487 unsigned cCpus; 1472 1488 int rc; 1489 IPRT_LINUX_SAVE_EFL_AC(); 1473 1490 1474 1491 rtR0LnxWorkqueueFlush(); /* for 2.4 */ … … 1479 1496 */ 1480 1497 if (!RTTIMER_FLAGS_ARE_VALID(fFlags)) 1498 { 1499 IPRT_LINUX_RESTORE_EFL_AC(); 1481 1500 return VERR_INVALID_PARAMETER; 1501 } 1482 1502 if ( (fFlags & RTTIMER_FLAGS_CPU_SPECIFIC) 1483 1503 && (fFlags & RTTIMER_FLAGS_CPU_ALL) != RTTIMER_FLAGS_CPU_ALL 1484 1504 && !RTMpIsCpuPossible(RTMpCpuIdFromSetIndex(fFlags & RTTIMER_FLAGS_CPU_MASK))) 1505 { 1506 IPRT_LINUX_RESTORE_EFL_AC(); 1485 1507 return VERR_CPU_NOT_FOUND; 1508 } 1486 1509 1487 1510 /* … … 1494 1517 cCpus = RTMpGetMaxCpuId() + 1; 1495 1518 Assert(cCpus <= RTCPUSET_MAX_CPUS); /* On linux we have a 1:1 relationship between cpuid and set index. */ 1496 AssertReturn (u64NanoInterval, VERR_NOT_IMPLEMENTED); /* We don't implement single shot on all cpus, sorry. */1519 AssertReturnStmt(u64NanoInterval, IPRT_LINUX_RESTORE_EFL_AC(), VERR_NOT_IMPLEMENTED); /* We don't implement single shot on all cpus, sorry. */ 1497 1520 } 1498 1521 #endif … … 1501 1524 RTMEMALLOCEX_FLAGS_ZEROED | RTMEMALLOCEX_FLAGS_ANY_CTX_FREE, (void **)&pTimer); 1502 1525 if (RT_FAILURE(rc)) 1526 { 1527 IPRT_LINUX_RESTORE_EFL_AC(); 1503 1528 return rc; 1529 } 1504 1530 1505 1531 /* … … 1568 1594 { 1569 1595 RTTimerDestroy(pTimer); 1596 IPRT_LINUX_RESTORE_EFL_AC(); 1570 1597 return rc; 1571 1598 } … … 1575 1602 RTTIMERLNX_LOG(("create %p hires=%d fFlags=%#x cCpus=%u\n", pTimer, pTimer->fHighRes, fFlags, cCpus)); 1576 1603 *ppTimer = pTimer; 1604 IPRT_LINUX_RESTORE_EFL_AC(); 1577 1605 return VINF_SUCCESS; 1578 1606 } … … 1585 1613 * querying the resolution of the high res timers? */ 1586 1614 struct timespec Ts; 1587 int rc = hrtimer_get_res(CLOCK_MONOTONIC, &Ts); 1615 int rc; 1616 IPRT_LINUX_SAVE_EFL_AC(); 1617 rc = hrtimer_get_res(CLOCK_MONOTONIC, &Ts); 1618 IPRT_LINUX_RESTORE_EFL_AC(); 1588 1619 if (!rc) 1589 1620 {
Note:
See TracChangeset
for help on using the changeset viewer.