VirtualBox

Changeset 14944 in vbox


Ignore:
Timestamp:
Dec 3, 2008 2:09:42 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40296
Message:

Fix the final few occurrences of tabs in Main.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/darwin/PerformanceDarwin.cpp

    r12678 r14944  
    3939extern "C" int proc_pidinfo(int pid, int flavor, uint64_t arg,  void *buffer, int buffersize);
    4040struct proc_taskinfo {
    41         uint64_t                pti_virtual_size;   /* virtual memory size (bytes) */
    42         uint64_t                pti_resident_size;  /* resident memory size (bytes) */
    43         uint64_t                pti_total_user;         /* total time */
    44         uint64_t                pti_total_system;
    45         uint64_t                pti_threads_user;       /* existing threads only */
    46         uint64_t                pti_threads_system;
    47         int32_t                 pti_policy;             /* default policy for new threads */
    48         int32_t                 pti_faults;             /* number of page faults */
    49         int32_t                 pti_pageins;    /* number of actual pageins */
    50         int32_t                 pti_cow_faults; /* number of copy-on-write faults */
    51         int32_t                 pti_messages_sent;      /* number of messages sent */
    52         int32_t                 pti_messages_received; /* number of messages received */
    53         int32_t                 pti_syscalls_mach;  /* number of mach system calls */
    54         int32_t                 pti_syscalls_unix;  /* number of unix system calls */
    55         int32_t                 pti_csw;            /* number of context switches */
    56         int32_t                 pti_threadnum;          /* number of threads in the task */
    57         int32_t                 pti_numrunning;         /* number of running threads */
    58         int32_t                 pti_priority;           /* task priority*/
     41    uint64_t    pti_virtual_size;       /* virtual memory size (bytes) */
     42    uint64_t    pti_resident_size;      /* resident memory size (bytes) */
     43    uint64_t    pti_total_user;         /* total time */
     44    uint64_t    pti_total_system;
     45    uint64_t    pti_threads_user;       /* existing threads only */
     46    uint64_t    pti_threads_system;
     47    int32_t     pti_policy;             /* default policy for new threads */
     48    int32_t     pti_faults;             /* number of page faults */
     49    int32_t     pti_pageins;            /* number of actual pageins */
     50    int32_t     pti_cow_faults;         /* number of copy-on-write faults */
     51    int32_t     pti_messages_sent;      /* number of messages sent */
     52    int32_t     pti_messages_received; /* number of messages received */
     53    int32_t     pti_syscalls_mach;      /* number of mach system calls */
     54    int32_t     pti_syscalls_unix;      /* number of unix system calls */
     55    int32_t     pti_csw;                /* number of context switches */
     56    int32_t     pti_threadnum;          /* number of threads in the task */
     57    int32_t     pti_numrunning;         /* number of running threads */
     58    int32_t     pti_priority;           /* task priority*/
    5959};
    6060#define PROC_PIDTASKINFO 4
     
    101101    mach_msg_type_number_t count;
    102102    host_cpu_load_info_data_t info;
    103    
     103
    104104    count = HOST_CPU_LOAD_INFO_COUNT;
    105    
     105
    106106    krc = host_statistics(mach_host_self(), HOST_CPU_LOAD_INFO, (host_info_t)&info, &count);
    107107    if (krc != KERN_SUCCESS)
     
    110110        return RTErrConvertFromDarwinKern(krc);
    111111    }
    112        
     112
    113113    *user = (uint64_t)info.cpu_ticks[CPU_STATE_USER]
    114114                    + info.cpu_ticks[CPU_STATE_NICE];
     
    123123    mach_msg_type_number_t count;
    124124    vm_statistics_data_t info;
    125    
     125
    126126    count = HOST_VM_INFO_COUNT;
    127    
     127
    128128    krc = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&info, &count);
    129129    if (krc != KERN_SUCCESS)
  • trunk/src/VBox/Main/glue/initterm.cpp

    r14325 r14944  
    7575    DirectoryServiceProvider()
    7676        : mCompRegLocation (NULL), mXPTIDatLocation (NULL)
    77         , mComponentDirLocation (NULL), mCurrProcDirLocation (NULL)
     77        , mComponentDirLocation (NULL), mCurrProcDirLocation (NULL)
    7878        {}
    7979
     
    8282    HRESULT init (const char *aCompRegLocation,
    8383                  const char *aXPTIDatLocation,
    84                   const char *aComponentDirLocation,
    85                   const char *aCurrProcDirLocation);
     84                  const char *aComponentDirLocation,
     85                  const char *aCurrProcDirLocation);
    8686
    8787    NS_DECL_NSIDIRECTORYSERVICEPROVIDER
     
    128128DirectoryServiceProvider::init (const char *aCompRegLocation,
    129129                                const char *aXPTIDatLocation,
    130                                 const char *aComponentDirLocation,
    131                                 const char *aCurrProcDirLocation)
     130                                const char *aComponentDirLocation,
     131                                const char *aCurrProcDirLocation)
    132132{
    133133    AssertReturn (aCompRegLocation, NS_ERROR_INVALID_ARG);
     
    140140        vrc = RTStrUtf8ToCurrentCP (&mComponentDirLocation, aComponentDirLocation);
    141141    if (RT_SUCCESS (vrc) && aCurrProcDirLocation)
    142         vrc = RTStrUtf8ToCurrentCP (&mCurrProcDirLocation, aCurrProcDirLocation);
     142        vrc = RTStrUtf8ToCurrentCP (&mCurrProcDirLocation, aCurrProcDirLocation);
    143143
    144144    return RT_SUCCESS (vrc) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
     
    163163        fileLocation = mXPTIDatLocation;
    164164    else if (mComponentDirLocation && strcmp (aProp, NS_XPCOM_COMPONENT_DIR) == 0)
    165         fileLocation = mComponentDirLocation;
     165        fileLocation = mComponentDirLocation;
    166166    else if (mCurrProcDirLocation && strcmp (aProp, NS_XPCOM_CURRENT_PROCESS_DIR) == 0)
    167         fileLocation = mCurrProcDirLocation;
     167        fileLocation = mCurrProcDirLocation;
    168168    else
    169169        return NS_ERROR_FAILURE;
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r14717 r14944  
    5858{
    5959public:
    60         CMyComClassFactorySingleton() : m_hrCreate(S_OK){}
    61         virtual ~CMyComClassFactorySingleton(){}
    62         // IClassFactory
    63         STDMETHOD(CreateInstance)(LPUNKNOWN pUnkOuter, REFIID riid, void** ppvObj)
    64         {
    65                 HRESULT hRes = E_POINTER;
    66                 if (ppvObj != NULL)
    67                 {
    68                         *ppvObj = NULL;
    69                         // Aggregation is not supported in singleton objects.
    70                         ATLASSERT(pUnkOuter == NULL);
    71                         if (pUnkOuter != NULL)
    72                                 hRes = CLASS_E_NOAGGREGATION;
    73                         else
    74                         {
    75                                 if (m_hrCreate == S_OK && m_spObj == NULL)
    76                                 {
    77                                         Lock();
    78                                         __try
    79                                         {
    80                                                 // Fix:  The following If statement was moved inside the __try statement.
    81                                                 // Did another thread arrive here first?
    82                                                 if (m_hrCreate == S_OK && m_spObj == NULL)
    83                                                 {
    84                                                         // lock the module to indicate activity
    85                                                         // (necessary for the monitor shutdown thread to correctly
    86                                                         // terminate the module in case when CreateInstance() fails)
    87                                                         _pAtlModule->Lock();
    88                                                         CComObjectCached<T> *p;
    89                                                         m_hrCreate = CComObjectCached<T>::CreateInstance(&p);
    90                                                         if (SUCCEEDED(m_hrCreate))
    91                                                         {
    92                                                                 m_hrCreate = p->QueryInterface(IID_IUnknown, (void**)&m_spObj);
    93                                                                 if (FAILED(m_hrCreate))
    94                                                                 {
    95                                                                         delete p;
    96                                                                 }
    97                                                         }
    98                                                         _pAtlModule->Unlock();
    99                                                 }
    100                                         }
    101                                         __finally
    102                                         {
    103                                                 Unlock();
    104                                         }
    105                                 }
    106                                 if (m_hrCreate == S_OK)
    107                                 {
    108                                         hRes = m_spObj->QueryInterface(riid, ppvObj);
    109                                 }
    110                                 else
    111                                 {
    112                                         hRes = m_hrCreate;
    113                                 }
    114                         }
    115                 }
    116                 return hRes;
    117         }
    118         HRESULT m_hrCreate;
    119         CComPtr<IUnknown> m_spObj;
     60    CMyComClassFactorySingleton() : m_hrCreate(S_OK){}
     61    virtual ~CMyComClassFactorySingleton(){}
     62    // IClassFactory
     63    STDMETHOD(CreateInstance)(LPUNKNOWN pUnkOuter, REFIID riid, void** ppvObj)
     64    {
     65        HRESULT hRes = E_POINTER;
     66        if (ppvObj != NULL)
     67        {
     68            *ppvObj = NULL;
     69            // Aggregation is not supported in singleton objects.
     70            ATLASSERT(pUnkOuter == NULL);
     71            if (pUnkOuter != NULL)
     72                hRes = CLASS_E_NOAGGREGATION;
     73            else
     74            {
     75                if (m_hrCreate == S_OK && m_spObj == NULL)
     76                {
     77                    Lock();
     78                    __try
     79                    {
     80                        // Fix:  The following If statement was moved inside the __try statement.
     81                        // Did another thread arrive here first?
     82                        if (m_hrCreate == S_OK && m_spObj == NULL)
     83                        {
     84                            // lock the module to indicate activity
     85                            // (necessary for the monitor shutdown thread to correctly
     86                            // terminate the module in case when CreateInstance() fails)
     87                            _pAtlModule->Lock();
     88                            CComObjectCached<T> *p;
     89                            m_hrCreate = CComObjectCached<T>::CreateInstance(&p);
     90                            if (SUCCEEDED(m_hrCreate))
     91                            {
     92                                m_hrCreate = p->QueryInterface(IID_IUnknown, (void**)&m_spObj);
     93                                if (FAILED(m_hrCreate))
     94                                {
     95                                    delete p;
     96                                }
     97                            }
     98                            _pAtlModule->Unlock();
     99                        }
     100                    }
     101                    __finally
     102                    {
     103                        Unlock();
     104                    }
     105                }
     106                if (m_hrCreate == S_OK)
     107                {
     108                    hRes = m_spObj->QueryInterface(riid, ppvObj);
     109                }
     110                else
     111                {
     112                    hRes = m_hrCreate;
     113                }
     114            }
     115        }
     116        return hRes;
     117    }
     118    HRESULT m_hrCreate;
     119    CComPtr<IUnknown> m_spObj;
    120120};
    121121
Note: See TracChangeset for help on using the changeset viewer.

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