VirtualBox

Changeset 12627 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 22, 2008 8:58:39 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt: reduce the number of dependencies to iprt/asm.h

Location:
trunk/src/VBox/Frontends
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h

    r8219 r12627  
    2929#include <VBox/log.h>
    3030#include <iprt/assert.h>
    31 
    3231#include <iprt/alloc.h>
    33 #include <iprt/asm.h>
    3432
    3533#ifdef VBOX_GUI_DEBUG
     
    7876{
    7977public:
    80     inline static uint64_t ticks() {
    81         return ASMReadTSC();
    82     }
     78    static uint64_t ticks();
    8379    inline static uint64_t msecs( uint64_t tcks ) {
    8480        return tcks / ticks_per_msec;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r11955 r12627  
    8989#if defined (VBOX_GUI_DEBUG)
    9090uint64_t VMCPUTimer::ticks_per_msec = (uint64_t) -1LL; // declared in VBoxDefs.h
     91/* don't make this function inline to not depend on iprt/asm.h in VBoxDefs.h */
     92uint64_t VMCPUTimer::ticks()
     93{
     94        return ASMReadTSC();
     95}
    9196#endif
    9297
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h

    r12286 r12627  
    2929#include <VBox/log.h>
    3030#include <iprt/assert.h>
    31 
    3231#include <iprt/alloc.h>
    33 #include <iprt/asm.h>
    3432
    3533#ifdef VBOX_GUI_DEBUG
     
    7876{
    7977public:
    80     inline static uint64_t ticks() {
    81         return ASMReadTSC();
    82     }
     78    /* don't inline this function to not depend on iprt/asm.h here */
     79    static uint64_t ticks();
    8380    inline static uint64_t msecs( uint64_t tcks ) {
    8481        return tcks / ticks_per_msec;
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r12553 r12627  
    103103#if defined (VBOX_GUI_DEBUG)
    104104uint64_t VMCPUTimer::ticks_per_msec = (uint64_t) -1LL; // declared in VBoxDefs.h
     105uint64_t VMCPUTimer::ticks()
     106{
     107    return ASMReadTSC();
     108}
    105109#endif
    106110
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