Changeset 22041


Ignore:
Timestamp:
Nov 1, 2012, 1:38:33 AM (8 years ago)
Author:
dmik
Message:

kernel32: Add public debug log lock/unlock methods for higher level serialization.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/dbglog.h

    r21916 r22041  
    3535  #define dassert(a, b)   if(!(a)) dprintf b
    3636  #define dbgCheckObj(a)        a->checkObject()
     37  #define dprintfLock()   WriteLogLock()
     38  #define dprintfUnlock() WriteLogUnlock()
    3739  #define DisableLogging()  DecreaseLogCount()
    3840  #define EnableLogging()   IncreaseLogCount()
     
    5658  #define dassert(a, b)
    5759  #define dbgCheckObj(a)
     60  #define dprintfLock()
     61  #define dprintfUnlock()
    5862  #define DisableLogging()
    5963  #define EnableLogging()
     
    8185int  SYSTEM WriteLogNoEOL(const char *tekst, ...);
    8286int  SYSTEM WritePrivateLog(void *logfile, const char *tekst, ...);
     87
     88void SYSTEM WriteLogLock();
     89void SYSTEM WriteLogUnlock();
    8390
    8491void SYSTEM DecreaseLogCount();
  • trunk/include/win/debugtools.h

    r21916 r22041  
    3131  #define dassert(a, b)   if(!(a)) dprintf b
    3232  #define dbgCheckObj(a)   a->checkObject()
     33  #define dprintfLock()   WriteLogLock()
     34  #define dprintfUnlock() WriteLogUnlock()
    3335
    3436#ifdef DEBUG_ENABLELOG_LEVEL2
     
    4951  #define dassert(a, b)
    5052  #define dbgCheckObj(a)
     53  #define dprintfLock()
     54  #define dprintfUnlock()
    5155#endif
    5256
    5357int  SYSTEM WriteLog(const char *tekst, ...);
    5458int  SYSTEM WritePrivateLog(void *logfile, const char *tekst, ...);
     59
     60void SYSTEM WriteLogLock();
     61void SYSTEM WriteLogUnlock();
    5562
    5663void SYSTEM DecreaseLogCount();
  • trunk/src/kernel32/dbglog.cpp

    r22005 r22041  
    337337}
    338338
     339void SYSTEM WriteLogLock()
     340{
     341    logMutex.enter();
     342}
     343
     344void SYSTEM WriteLogUnlock()
     345{
     346    logMutex.leave();
     347}
     348
    339349int SYSTEM WriteLog(const char *tekst, ...)
    340350{
Note: See TracChangeset for help on using the changeset viewer.