lobot::UpdateLock Class Reference

An object to help coordinate read-write accesses to various shared objects within the Robolocust controller. More...

#include <Robots/LoBot/thread/LoUpdateLock.H>

List of all members.

Public Member Functions

 ~UpdateLock ()
 Clean-up.

void read_lock ()
 The locking functions.
void write_lock ()
void unlock ()

Static Public Member Functions

static void begin_read ()
 Convenience functions.
static void end_read ()
static void begin_write ()
static void end_write ()

Friends

class singleton< UpdateLock >

Detailed Description

An object to help coordinate read-write accesses to various shared objects within the Robolocust controller.

This class implements a reader-writer lock meant to be shared by the Robolocust controller's main thread and each of its behaviours. The main thread is responsible for updating the different sensors (laser range finder, cameras, etc.) and other objects (LGMD models, integration algorithm, etc.). The individual behaviours simply retrieve the latest values from these objects.

Each thread must take care of using this lock appropriately when required. That is, the objects themselves do not perform any locking (in other words, they are not thread-safe).

Definition at line 90 of file LoUpdateLock.H.


Constructor & Destructor Documentation

lobot::UpdateLock::~UpdateLock (  ) 

Clean-up.

Definition at line 110 of file LoUpdateLock.C.


Member Function Documentation

static void lobot::UpdateLock::begin_read (  )  [inline, static]

Convenience functions.

Definition at line 114 of file LoUpdateLock.H.

void lobot::UpdateLock::read_lock (  ) 

The locking functions.

Definition at line 92 of file LoUpdateLock.C.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:44:35 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3