Ignore:
Timestamp:
05/01/04 16:33:16 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r2784 r3927  
    359359
    360360    // lock mutex
    361     Lock();
     361    Lock("UpdateGui");
    362362
    363363    TGText &txt=*fGui->GetText();
     
    387387
    388388    // release mutex
    389     UnLock();
    390 }
    391 
    392 void MLog::Lock()
     389    UnLock("UpdateGui");
     390}
     391
     392void MLog::Lock(const char *msg)
    393393{
    394394#ifdef _REENTRANT
    395     fMuxGui->Lock();
     395    if (fMuxGui->Lock()==13)
     396        Error("Lock", "%s - mutex is already locked by this thread\n", msg);
    396397#endif
    397398}
    398399
    399 void MLog::UnLock()
     400void MLog::UnLock(const char *msg)
    400401{
    401402#ifdef _REENTRANT
    402     fMuxGui->UnLock();
     403    if (fMuxGui->UnLock()==13)
     404        Error("UnLock", "%s - tried to unlock mutex locked by other thread\n", msg);
    403405#endif
    404406}
     
    410412int MLog::sync()
    411413{
    412     Lock();
     414    Lock("sync");
    413415    WriteBuffer();
    414     UnLock();
     416    UnLock("sync");
    415417
    416418    if (fDevice&eStdout)
     
    446448    if (fOutputLevel <= fDebugLevel)
    447449    {
    448         Lock();
     450        Lock("overflow");
    449451
    450452        *fPPtr++ = (char)i;
     
    453455            WriteBuffer();
    454456
    455         UnLock();
     457        UnLock("overflow");
    456458    }
    457459
  • trunk/MagicSoft/Mars/mbase/MLog.h

    r3183 r3927  
    102102    ~MLog();
    103103
    104     void Lock();
    105     void UnLock();
     104    void Lock(const char *msg);
     105    void UnLock(const char *msg);
    106106
    107107    void EnableDirectGui()  { fIsDirectGui = kTRUE; }
  • trunk/MagicSoft/Mars/mbase/Makefile

    r3581 r3927  
    11##################################################################
    22#
    3 #   makefile
     3#   subdirectory makefile
    44#
    55#   for the MARS software
    66#
    77##################################################################
    8 # @maintitle
    9 
    10 # @code
    11 
    12 #
    13 #  please change all system depend values in the
    14 #  config.mk.${OSTYPE} file
    15 #
    16 #
    178include ../Makefile.conf.$(OSTYPE)
    189include ../Makefile.conf.general
    1910
    20 # @endcode
     11#------------------------------------------------------------------------------
    2112
    2213INCLUDES = -I. -I../mfileio -I../mfbase -I../mastro
     
    2516# mastro:   MAstro (MTime)
    2617
    27 # @code
    28 
    29 CINT     = Base
    30 LIB      = mbase.a
    31 
    32 #------------------------------------------------------------------------------
    33 
    34 .SUFFIXES: .c .cc .cxx .h .hxx .o
     18CINT = Base
    3519
    3620SRCFILES = MLogo.cc \
     
    4933           MFilter.cc \
    5034           MEvtLoop.cc \
    51            MStatusDisplay.cc \
    5235           MProgressBar.cc \
    5336           MSearch.cc \
     
    7053           MPrint.cc
    7154
    72 SRCS    = $(SRCFILES)
    73 HEADERS = $(SRCFILES:.cc=.h)
    74 OBJS    = $(SRCFILES:.cc=.o)
    75 
    7655############################################################
    7756
    78 all: $(LIB)
     57all: $(OBJS)
    7958
    8059include ../Makefile.rules
    8160
    82 #clean: rmcint rmobjs rmcore rmlib
    83 
    8461mrproper:       clean rmbak
    85 
    86 # @endcode
Note: See TracChangeset for help on using the changeset viewer.