• Blue Swirl's avatar
    qemu-timer: move commonly used timer code to qemu-timer-common · c57c846a
    Blue Swirl authored
    Move timer init functions to a new file, qemu-timer-common.c. Make other
    critical timer functions inlined to preserve performance in
    qemu-timer.c, also move muldiv64() (used by the inline functions)
    to qemu-timer.h.
    
    Adjust block/raw-posix.c and simpletrace.c to use get_clock() directly.
    Remove a similar/duplicate definition in qemu-tool.c.
    
    Adjust hw/omap_clk.c to include qemu-timer.h because muldiv64() is used
    there.
    
    After this change, tracing can be used also for user code and
    simpletrace on Win32.
    
    Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    Acked-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
    c57c846a
qemu-timer-common.c 1.95 KB