Functions

AcsBulkdata::Pthread::Mutex Namespace Reference

Functions

void init (pthread_mutex_t &m, const bool recursive)
bool lock (const char *desc, pthread_mutex_t &m, const ACS::TimeInterval &to, bool logTimeout=false)
bool unlock (const char *desc, pthread_mutex_t &m)
bool unlock (pthread_mutex_t &m)

Detailed Description

Mutex functions.


Function Documentation

void AcsBulkdata::Pthread::Mutex::init ( pthread_mutex_t &  m,
const bool  recursive 
)

Initialize given mutex as recursive or not recursive.

bool AcsBulkdata::Pthread::Mutex::lock ( const char *  desc,
pthread_mutex_t &  m,
const ACS::TimeInterval &  to,
bool  logTimeout = false 
)

Helper class to block on a pthread mutex for a given time.

Parameters:
desc description of the mutex to add context to eventual error logs.
m pointer to pthread mutex.
to timeout interval in ACS units.
bool AcsBulkdata::Pthread::Mutex::unlock ( const char *  desc,
pthread_mutex_t &  m 
)

Helper class to unlock a pthread mutex.

Parameters:
desc description of the mutex to add context to eventual error logs.
m pointer to pthread mutex.
bool AcsBulkdata::Pthread::Mutex::unlock ( pthread_mutex_t &  m  ) 

Helper class to unlock a pthread mutex.

Parameters:
m pointer to pthread mutex.