VirtualBox

Ignore:
Timestamp:
Jan 18, 2007 2:42:26 PM (18 years ago)
Author:
vboxsync
Message:

Fixed the-linux-kernel.h for kernels 2.4.28 to 2.4.34

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h

    r1 r136  
    108108# endif
    109109
     110#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 29) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     111
    110112DECLINLINE(unsigned int) jiffies_to_msecs(unsigned long cJiffies)
    111113{
    112 # if HZ <= 1000 && !(1000 % HZ)
     114#  if HZ <= 1000 && !(1000 % HZ)
    113115    return (1000 / HZ) * cJiffies;
    114 # elif HZ > 1000 && !(HZ % 1000)
     116#  elif HZ > 1000 && !(HZ % 1000)
    115117    return (cJiffies + (HZ / 1000) - 1) / (HZ / 1000);
    116 # else
     118#  else
    117119    return (j * 1000) / HZ;
    118 # endif
     120#  endif
    119121}
    120122
    121123DECLINLINE(unsigned long) msecs_to_jiffies(unsigned int cMillies)
    122124{
    123 # if HZ > 1000
     125#  if HZ > 1000
    124126    if (cMillies > jiffies_to_msecs(MAX_JIFFY_OFFSET))
    125127        return MAX_JIFFY_OFFSET;
    126 # endif
    127 # if HZ <= 1000 && !(1000 % HZ)
     128#  endif
     129#  if HZ <= 1000 && !(1000 % HZ)
    128130    return (cMillies + (1000 / HZ) - 1) / (1000 / HZ);
    129 # elif HZ > 1000 && !(HZ % 1000)
     131#  elif HZ > 1000 && !(HZ % 1000)
    130132    return cMillies * (HZ / 1000);
    131 # else
     133#  else
    132134    return (cMillies * HZ + 999) / 1000;
    133 # endif
     135#  endif
    134136}
     137
     138# endif  /* < 2.4.29 || >= 2.6.0 */
    135139
    136140# define prepare_to_wait(q, wait, state) \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette