CARMA C++
carma::util::PthreadAttr Class Reference

A simple wrapper class that makes use of ::pthread_attr_t easier in a C++ world. More...

#include <carma/util/PthreadAttr.h>

Public Member Functions

int getDetachState () const
 
::size_t getGuardSize () const
 
::size_t getStackSize () const
 
const ::pthread_attr_t & InternalPthreadAttr () const
 Obtain a reference to the internal ::pthread_attr_t. More...
 
::pthread_attr_t & InternalPthreadAttr ()
 Obtain a reference to the internal ::pthread_attr_t. More...
 
 PthreadAttr ()
 Construct pthread attributes with the CARMA defaults. More...
 
 PthreadAttr (int detachState)
 Construct pthread attributes with the given detached state More...
 
void setDetachState (int detachState)
 
void setGuardSize (::size_t guardSize)
 
void setStackSize (::size_t stackSize)
 
virtual ~PthreadAttr ()
 Destruct pthread attributes. More...
 

Detailed Description

A simple wrapper class that makes use of ::pthread_attr_t easier in a C++ world.

Definition at line 14 of file PthreadAttr.h.

Constructor & Destructor Documentation

carma::util::PthreadAttr::PthreadAttr ( )
explicit

Construct pthread attributes with the CARMA defaults.

Any internal errors will throw an exception.

carma::util::PthreadAttr::PthreadAttr ( int  detachState)
explicit

Construct pthread attributes with the given detached state

Any internal errors will throw an exception.

virtual carma::util::PthreadAttr::~PthreadAttr ( )
virtual

Destruct pthread attributes.

No exceptions will be thrown and hence internal errors will be ignored as far as clients are concerned (though they may be logged).

Member Function Documentation

const ::pthread_attr_t & carma::util::PthreadAttr::InternalPthreadAttr ( ) const

Obtain a reference to the internal ::pthread_attr_t.

Warning
Use this with care. Certainly do not go off and call something like ::pthread_attr_destroy on the return value. If you don't know what you are doing with POSIX pthread attributes then think twice before using this method.
Returns
a reference to the internal ::pthread_attr_t

Definition at line 95 of file PthreadAttr.h.

pthread_attr_t & carma::util::PthreadAttr::InternalPthreadAttr ( )

Obtain a reference to the internal ::pthread_attr_t.

Warning
Use this with care. Certainly do not go off and call something like ::pthread_attr_destroy on the return value. If you don't know what you are doing with POSIX pthread attributes then think twice before using this method.
Returns
a reference to the internal ::pthread_attr_t

Definition at line 102 of file PthreadAttr.h.


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