Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

DAQThreadMutex Class Reference

Provides methods for manipulating a mutex. More...

Inheritance diagram for DAQThreadMutex::

DAQObject Printable List of all members.

Public Methods

 DAQThreadMutex ()
 Constructor. More...

 ~DAQThreadMutex ()
 Destructor. More...

int Lock ()
 Lock mutex. More...

int TryLock ()
 Try to lock mutex. More...

int UnLock ()
 Unlock mutex. More...

virtual void PrintEyeCatcher (ostream &)
 Print an eye catcher. More...


Protected Attributes

daqthread_mutex_t thrdmutex
 The mutex. More...


Friends

class DAQThreadCond

Detailed Description

The DAQThreadMutex class provides methods that implement a thread mutex.

Author:
Eric Kasten
Version:
0.4.0


Constructor & Destructor Documentation

DAQThreadMutex::DAQThreadMutex
 

Basic constructor method for this class.

Parameters:
None  
Returns:
this

DAQThreadMutex::~DAQThreadMutex
 

Destructor method for this class.

Parameters:
None  
Returns:
None


Member Function Documentation

int DAQThreadMutex::Lock
 

Attempts to lock the mutex. This method will block if the mutex has been locked by another thread.

Parameters:
None  
Returns:
When the mutex can be locked by a requesting thread
Return values:
0   if the lock was successful.
<0   if the lock was unsuccessful.

void DAQThreadMutex::PrintEyeCatcher ostream & aStream [virtual]
 

Print an eye catcher for this mutex.

Parameters:
aStream   An ostream object to which to print.
Returns:
None

Reimplemented from DAQObject.

int DAQThreadMutex::TryLock
 

Attempts to lock the mutex. This method doesn't block if the mutex has been locked by another thread.

Parameters:
None  
Returns:
When the mutex can be locked by a requesting thread
Return values:
0   if the lock was successful.
<0   if the lock was unsuccessful.

int DAQThreadMutex::UnLock
 

Unlocks the mutex.

Parameters:
None  
Returns:
If the unlock was successful
Return values:
0   if the unlock was successful.
<0   if the unlock was unsuccessful (owned by another thread).


Member Data Documentation

DAQThreadMutex::thrdmutex [protected]
 

The actual mutex that is locked.


The documentation for this class was generated from the following files:
Generated at Tue Jan 29 14:07:10 2002 for SpectroDAQ by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001