VirtualBox

Changeset 25813 in vbox


Ignore:
Timestamp:
Jan 13, 2010 5:24:35 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56586
Message:

Main: move AutoLock classes to glue

Location:
trunk
Files:
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r25674 r25813  
    283283        Global.cpp \
    284284        Logging.cpp \
    285         AutoLock.cpp \
    286285        Matching.cpp \
    287286        xml/Settings.cpp \
     
    610609        Global.cpp \
    611610        Logging.cpp \
    612         AutoLock.cpp \
    613611        VBoxDll.cpp \
    614612        USBDeviceImpl.cpp \
     
    687685        glue/initterm.cpp \
    688686        glue/string.cpp \
     687        glue/AutoLock.cpp \
    689688        glue/EventQueue.cpp \
    690689        glue/ErrorInfo.cpp \
  • trunk/src/VBox/Main/glue/AutoLock.cpp

    r25809 r25813  
    2020 */
    2121
    22 #include "AutoLock.h"
    23 
    24 #include "Logging.h"
    25 
    2622#include <iprt/cdefs.h>
    2723#include <iprt/critsect.h>
     
    4036#include <iprt/stream.h>
    4137
     38#include "VBox/com/AutoLock.h"
    4239#include <VBox/com/string.h>
    4340
     
    535532            AssertMsg(m->acUnlockedInLeave[i] >= 1, ("m->cUnlockedInLeave[%d] is %d, must be >=1!", i, m->acUnlockedInLeave[i]));
    536533
    537 #ifdef RT_LOCK_STRICT
    538             LogFlowFunc(("LOCKVAL: will unlock handle %d [%s] %d times\n", i, pHandle->describe(), m->acUnlockedInLeave[i]));
    539 #endif
    540 
    541534            for (uint32_t left = m->acUnlockedInLeave[i];
    542535                 left;
     
    566559        {
    567560            AssertMsg(m->acUnlockedInLeave[i] != 0, ("m->cUnlockedInLeave[%d] is 0! enter() without leave()?", i));
    568 
    569 #ifdef RT_LOCK_STRICT
    570             LogFlowFunc(("LOCKVAL: will lock handle %d [%s] %d times\n", i, pHandle->describe(), m->acUnlockedInLeave[i]));
    571 #endif
    572561
    573562            for (; m->acUnlockedInLeave[i]; --m->acUnlockedInLeave[i])
     
    600589                AssertMsg(m->acUnlockedInLeave[i] >= 1, ("m->cUnlockedInLeave[%d] is %d, must be >=1!", i, m->acUnlockedInLeave[i]));
    601590
    602 #ifdef RT_LOCK_STRICT
    603                 LogFlowFunc(("LOCKVAL: will unlock handle %d [%s] %d times\n", i, pHandle->describe(), m->acUnlockedInLeave[i]));
    604 #endif
    605 
    606591                for (uint32_t left = m->acUnlockedInLeave[i];
    607592                     left;
     
    631616            if (!pHandle->isWriteLockOnCurrentThread())
    632617            {
    633 #ifdef RT_LOCK_STRICT
    634                 LogFlowFunc(("LOCKVAL: will lock handle %d [%s] %d times\n", i, pHandle->describe(), m->acUnlockedInLeave[i]));
    635 #endif
    636 
    637618                for (; m->acUnlockedInLeave[i]; --m->acUnlockedInLeave[i])
    638619                    callLockImpl(*pHandle);
  • trunk/src/VBox/Main/glue/initterm.cpp

    r25812 r25813  
    5454#include "VBox/com/assert.h"
    5555#include "VBox/com/EventQueue.h"
     56#include "VBox/com/AutoLock.h"
    5657
    5758#include "../include/Logging.h"
     
    539540#endif /* !defined (VBOX_WITH_XPCOM) */
    540541
     542    // for both COM and XPCOM, we only get here if this is the main thread;
     543    // only then initialize the autolock system (AutoLock.cpp)
     544    Assert(RTThreadIsMain(RTThreadSelf()));
     545    util::InitAutoLockSystem();
     546
    541547    AssertComRC (rc);
    542548
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r25288 r25813  
    3030
    3131#include "VBox/com/ErrorInfo.h"
    32 #include <VBox/com/SupportErrorInfo.h>
     32#include "VBox/com/SupportErrorInfo.h"
     33#include "VBox/com/AutoLock.h"
    3334
    3435#include "VBox/com/VirtualBox.h"
     
    4041class File;
    4142}
    42 
    43 #include "AutoLock.h"
    4443
    4544using namespace com;
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