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

#include <XrdSysPthread.hh>

+ Inheritance diagram for XrdSysRecMutex:
+ Collaboration diagram for XrdSysRecMutex:

Public Member Functions

 XrdSysRecMutex ()
 
int InitRecMutex ()
 
int ReInitRecMutex ()
 
- Public Member Functions inherited from XrdSysMutex
 XrdSysMutex ()
 
 ~XrdSysMutex ()
 
int CondLock ()
 
void Lock ()
 
int TimedLock (int wait_ms)
 
void UnLock ()
 

Additional Inherited Members

- Protected Attributes inherited from XrdSysMutex
pthread_mutex_t cs
 

Detailed Description

Definition at line 241 of file XrdSysPthread.hh.

Constructor & Destructor Documentation

◆ XrdSysRecMutex()

XrdSysRecMutex::XrdSysRecMutex ( )

Definition at line 366 of file XrdSysPthread.cc.

367{
368 InitRecMutex();
369}

References InitRecMutex().

+ Here is the call graph for this function:

Member Function Documentation

◆ InitRecMutex()

int XrdSysRecMutex::InitRecMutex ( )

Definition at line 371 of file XrdSysPthread.cc.

372{
373 int rc;
374 pthread_mutexattr_t attr;
375
376 rc = pthread_mutexattr_init( &attr );
377
378 if( !rc )
379 {
380 pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
381 pthread_mutex_destroy( &cs );
382 rc = pthread_mutex_init( &cs, &attr );
383 }
384
385 pthread_mutexattr_destroy(&attr);
386 return rc;
387}
pthread_mutex_t cs

References XrdSysMutex::cs.

Referenced by XrdSysRecMutex(), and ReInitRecMutex().

+ Here is the caller graph for this function:

◆ ReInitRecMutex()

int XrdSysRecMutex::ReInitRecMutex ( )

Definition at line 389 of file XrdSysPthread.cc.

390{
391 pthread_mutex_destroy( &cs );
392 return InitRecMutex();
393}

References XrdSysMutex::cs, and InitRecMutex().

+ Here is the call graph for this function:

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