Changeset 70458 in vbox for trunk/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
- Timestamp:
- Jan 4, 2018 12:44:33 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120064
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
r69111 r70458 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 716 716 717 717 718 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 718 719 /** 719 720 * Timer callback function for standard timers. 720 721 * 722 * @param pLnxTimer Pointer to the Linux timer structure. 723 */ 724 static void rtTimerLinuxStdCallback(struct timer_list *pLnxTimer) 725 { 726 PRTTIMERLNXSUBTIMER pSubTimer = from_timer(pSubTimer, pLnxTimer, u.Std.LnxTimer); 727 #else 728 /** 729 * Timer callback function for standard timers. 730 * 721 731 * @param ulUser Address of the sub-timer structure. 722 732 */ … … 724 734 { 725 735 PRTTIMERLNXSUBTIMER pSubTimer = (PRTTIMERLNXSUBTIMER)ulUser; 736 #endif 726 737 PRTTIMER pTimer = pSubTimer->pParent; 727 738 … … 1585 1596 #endif 1586 1597 { 1587 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) 1598 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) 1599 timer_setup(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer, rtTimerLinuxStdCallback, TIMER_PINNED); 1600 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) 1588 1601 init_timer_pinned(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer); 1589 1602 #else 1590 1603 init_timer(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer); 1591 1604 #endif 1605 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) 1592 1606 pTimer->aSubTimers[iCpu].u.Std.LnxTimer.data = (unsigned long)&pTimer->aSubTimers[iCpu]; 1593 1607 pTimer->aSubTimers[iCpu].u.Std.LnxTimer.function = rtTimerLinuxStdCallback; 1608 #endif 1594 1609 pTimer->aSubTimers[iCpu].u.Std.LnxTimer.expires = jiffies; 1595 1610 pTimer->aSubTimers[iCpu].u.Std.u64NextTS = 0;
Note:
See TracChangeset
for help on using the changeset viewer.