miosix::Lock Class Reference
[Syncronization]

#include <sync.h>

Collaboration diagram for miosix::Lock:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Lock (Mutex &m)
 ~Lock ()


Detailed Description

Very simple RAII style class to lock a mutex in an exception-safe way. Mutex is acquired by the constructor and released by the destructor.

Note that this class will force the compiler to add exception support to the code, and this will increase code size by ~30KB (if you already use exceptions this will cause no code size overhead, however)


Constructor & Destructor Documentation

miosix::Lock::Lock ( Mutex m  )  [inline]

Constructor: locks the mutex

Parameters:
m mutex to lock

miosix::Lock::~Lock (  )  [inline]

Destructor: unlocks the mutex


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

Generated on Fri Jun 19 15:19:04 2009 for Miosix by  doxygen 1.5.6