Show
Ignore:
Timestamp:
06/08/07 14:44:39 (1 year ago)
Author:
patrick
Message:

Fixed a potential mutex deadlock. To do this, I changed the pre-condition of
gadget::DeviceServer::debugDump() so that mClientsLock must be held prior to
calling this method. This is not exactly ideal, but the alternative is to
reduce the exception safety guarantee of gadget::DeviceServer::send(), and
that seems like a much worse scenario.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/modules/gadgeteer/gadget/DeviceServer.cpp

    r19729 r20291  
    162162   void DeviceServer::debugDump(int debugLevel) 
    163163   { 
    164       vpr::Guard<vpr::Mutex> guard(mClientsLock); 
     164      vprASSERT(mClientsLock.test() && 
     165                "mClientsLock must be locked by the caller"); 
    165166 
    166167      vpr::DebugOutputGuard dbg_output(