qemu-timer: move commonly used timer code to qemu-timer-common
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:Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
Showing
- Makefile 3 additions, 3 deletionsMakefile
- Makefile.objs 2 additions, 1 deletionMakefile.objs
- block/raw-posix.c 6 additions, 6 deletionsblock/raw-posix.c
- hw/omap_clk.c 1 addition, 0 deletionshw/omap_clk.c
- qemu-common.h 0 additions, 2 deletionsqemu-common.h
- qemu-timer-common.c 62 additions, 0 deletionsqemu-timer-common.c
- qemu-timer.c 0 additions, 73 deletionsqemu-timer.c
- qemu-timer.h 74 additions, 0 deletionsqemu-timer.h
- qemu-tool.c 0 additions, 7 deletionsqemu-tool.c
- simpletrace.c 2 additions, 8 deletionssimpletrace.c
- vl.c 0 additions, 24 deletionsvl.c
Loading
Please register or sign in to comment