cpp-pthread  (v1.7.3)
Simple C++ wrapper to pthread functions.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Classes | Typedefs | Enumerations
Concurrency

Classes

class  pthread::condition_variable
 
class  pthread::lock_guard< MutexType >
 
class  pthread::mutex
 
class  pthread::read_lock
 
class  pthread::write_lock
 

Typedefs

typedef write_lock pthread::read_write_lock
 

Enumerations

enum  pthread::cv_status { pthread::no_timeout, pthread::timedout }
 

Detailed Description

Set of classes to handle concurrent access to shared ressources.

Author
herbert koelman (herbe.nosp@m.rt.k.nosp@m.oelma.nosp@m.n@me.nosp@m..com)

Typedef Documentation

typedef write_lock pthread::read_write_lock

A read/write lock.


...
pthread::read_write_lock _rwlock;
{
  // get a read lock
  pthread::lock_guard<pthread::read_lock> lock(_rwlck);
  ...
} // lock_guard unlock lock here
{
  // get write lock
  pthread::lock_guard<pthread::write_lock> lock(_rwlck);
  ...
} // lock_guard unlock lock here

Definition at line 139 of file read_write_lock.hpp.

Enumeration Type Documentation

condition variable current wait status.

Enumerator
no_timeout 

unblocked before a timeout occured

timedout 

condition timedout

Definition at line 33 of file condition_variable.hpp.