VirtualBox

Changeset 9236 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 29, 2008 9:41:45 PM (17 years ago)
Author:
vboxsync
Message:

Implemented RTTime for the linux kernel (not used yet).

Location:
trunk/src/VBox
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r8837 r9236  
     1/* $Rev:$ */
    12/** @file
    23 * The VirtualBox Support Driver - Linux hosts.
     
    154155#endif
    155156
    156 
    157 /** @def ONE_MSEC_IN_JIFFIES
    158  * The number of jiffies that make up 1 millisecond. Must be at least 1! */
    159 #if HZ <= 1000
    160 # define ONE_MSEC_IN_JIFFIES       1
    161 #elif !(HZ % 1000)
    162 # define ONE_MSEC_IN_JIFFIES       (HZ / 1000)
    163 #else
    164 # define ONE_MSEC_IN_JIFFIES       ((HZ + 999) / 1000)
    165 # error "HZ is not a multiple of 1000, the GIP stuff won't work right!"
    166 #endif
    167 
    168 /** @def TICK_NSEC
    169  * The time between ticks in nsec */
    170 #ifndef TICK_NSEC
    171 # define TICK_NSEC (1000000UL / HZ)
    172 #endif
    173157
    174158#ifdef CONFIG_X86_LOCAL_APIC
  • trunk/src/VBox/Runtime/Makefile.kmk

    r9228 r9236  
    930930        r0drv/linux/spinlock-r0drv-linux.c \
    931931        r0drv/linux/thread-r0drv-linux.c \
     932        r0drv/linux/time-r0drv-linux.c \
    932933        r0drv/memobj-r0drv.cpp
    933934## @todo thread2-r0drv-linux.c, timer-r0drv-linux.c and assert-r0drv-linux.c
  • trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h

    r8245 r9236  
    7777#include <linux/pagemap.h>
    7878#include <linux/slab.h>
     79#include <linux/time.h>
    7980#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 7)
    80 # include <linux/time.h>
    8181# include <linux/jiffies.h>
     82#endif
     83#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
     84# include <linux/ktime.h>
    8285#endif
    8386#include <linux/wait.h>
     
    248251#endif
    249252
     253/** @def ONE_MSEC_IN_JIFFIES
     254 * The number of jiffies that make up 1 millisecond. Must be at least 1! */
     255#if HZ <= 1000
     256# define ONE_MSEC_IN_JIFFIES       1
     257#elif !(HZ % 1000)
     258# define ONE_MSEC_IN_JIFFIES       (HZ / 1000)
     259#else
     260# define ONE_MSEC_IN_JIFFIES       ((HZ + 999) / 1000)
     261# error "HZ is not a multiple of 1000, the GIP stuff won't work right!"
     262#endif
     263
     264/** @def TICK_NSEC
     265 * The time between ticks in nsec */
     266#ifndef TICK_NSEC
     267# define TICK_NSEC (1000000UL / HZ)
     268#endif
     269
    250270/*
    251271 * Stop using the linux bool type.
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