sptk2 logo
SPTK Home Page

sptk::CRWLock Class Reference
[Thread Classes]

Read-write synchronization object. More...

#include <CRWLock.h>

List of all members.

Public Member Functions

 CRWLock ()
 Constructor.
 ~CRWLock ()
 Destructor.
int lockR (int timeout=SP_INFINITY)
int lockRW (int timeout=SP_INFINITY)
void unlock ()
 Releases lock on the object.

Protected Attributes

pthread_rwlock_t m_rwlock
 pthreads rwlock object


Detailed Description

Read-write synchronization object.

Member Function Documentation

int sptk::CRWLock::lockR ( int  timeout = SP_INFINITY  ) 

Try to lock the object for reading. Blocks if object is locked for writing, or there are pending write locks.

Parameters:
timeout int, timeout in milliseconds

int sptk::CRWLock::lockRW ( int  timeout = SP_INFINITY  ) 

Try to lock the object for writing. Blocks if object is locked for reading or writing.

Parameters:
timeout int, timeout in milliseconds


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

Mon Mar 5 11:56:20 2012: SPTK 3.5.7