reSIProcate/rutil  9694
Functions
Lock.cxx File Reference
#include "rutil/Lock.hxx"
Include dependency graph for Lock.cxx:

Go to the source code of this file.

Functions

static void takeLock (Lockable &lockable, LockType lockType)

Function Documentation

static void takeLock ( Lockable lockable,
LockType  lockType 
) [inline, static]

Definition at line 13 of file Lock.cxx.

References resip::Lockable::lock(), resip::Lockable::readlock(), resip::VOCAL_READLOCK, resip::VOCAL_WRITELOCK, and resip::Lockable::writelock().

Referenced by resip::Lock::Lock(), and resip::PtrLock::PtrLock().

                                                                   {
   switch ( lockType )
    {
       case resip::VOCAL_READLOCK:
       {
          lockable.readlock();
          break;
       }
            
       case resip::VOCAL_WRITELOCK:
       {
          lockable.writelock();
          break;
       }
       
       default:
       {
          lockable.lock();
          break;
       }
    }
}

Here is the call graph for this function: