XRootD
Loading...
Searching...
No Matches
XrdSysMutexHelper Class Reference

#include <XrdSysPthread.hh>

+ Collaboration diagram for XrdSysMutexHelper:

Public Member Functions

 XrdSysMutexHelper (XrdSysMutex &mutex)
 
 XrdSysMutexHelper (XrdSysMutex *mutex=0)
 
 ~XrdSysMutexHelper ()
 
void Lock (XrdSysMutex *Mutex)
 
void UnLock ()
 

Detailed Description

Definition at line 262 of file XrdSysPthread.hh.

Constructor & Destructor Documentation

◆ XrdSysMutexHelper() [1/2]

XrdSysMutexHelper::XrdSysMutexHelper ( XrdSysMutex mutex = 0)
inline

Definition at line 276 of file XrdSysPthread.hh.

277 {if (mutex) mutex->Lock();
278 mtx = mutex;
279 }

◆ XrdSysMutexHelper() [2/2]

XrdSysMutexHelper::XrdSysMutexHelper ( XrdSysMutex mutex)
inline

Definition at line 280 of file XrdSysPthread.hh.

281 {mutex.Lock();
282 mtx = &mutex;
283 }

References XrdSysMutex::Lock().

+ Here is the call graph for this function:

◆ ~XrdSysMutexHelper()

XrdSysMutexHelper::~XrdSysMutexHelper ( )
inline

Definition at line 285 of file XrdSysPthread.hh.

285{if (mtx) UnLock();}

References UnLock().

+ Here is the call graph for this function:

Member Function Documentation

◆ Lock()

void XrdSysMutexHelper::Lock ( XrdSysMutex Mutex)
inline

Definition at line 266 of file XrdSysPthread.hh.

267 {if (mtx) {if (mtx != Mutex) mtx->UnLock();
268 else return;
269 }
270 Mutex->Lock();
271 mtx = Mutex;
272 };

References XrdSysMutex::Lock(), and XrdSysMutex::UnLock().

Referenced by XrdSys::IOEvents::Poller::CbkXeq(), XrdLinkXeq::Close(), XrdOucProg::Feed(), XrdTlsSocket::getCerts(), XrdOssMio::Map(), XrdTlsSocket::NeedHandShake(), XrdLinkXeq::Peek(), XrdTlsSocket::Peek(), XrdTlsSocket::Pending(), XrdSsiServReal::ProcessRequest(), XrdTlsSocket::Read(), XrdLinkXeq::Recv(), XrdLinkXeq::Recv(), XrdOssCsi::Rename(), XrdTlsSocket::Shutdown(), XrdOssSys::Stage_RT(), XrdCl::PollerBuiltIn::Stop(), XrdLinkXeq::TLS_Peek(), XrdLinkXeq::TLS_Recv(), XrdLinkXeq::TLS_Recv(), XrdLinkXeq::TLS_Recv(), and XrdTlsSocket::Write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnLock()

void XrdSysMutexHelper::UnLock ( )
inline

Definition at line 274 of file XrdSysPthread.hh.

274{if (mtx) {mtx->UnLock(); mtx = 0;}}

References XrdSysMutex::UnLock().

Referenced by ~XrdSysMutexHelper(), XrdSys::IOEvents::Poller::CbkXeq(), XrdLinkXeq::Close(), XrdCl::XCpCtx::Delete(), XrdCl::XCpSrc::Delete(), XrdCl::Stream::ForceError(), XrdNetRegistry::GetAddrs(), XrdOssCsiFile::mapRelease(), XrdCl::Stream::OnError(), XrdCl::Stream::OnReadTimeout(), XrdCl::Stream::OnReadyToWrite(), XrdCl::SIDMgrPool::Recycle(), XrdCl::PollerBuiltIn::RemoveSocket(), XrdOssSys::Stage_RT(), and XrdCl::PollerBuiltIn::Stop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: