miosix::Lock Class Reference

#include <sync.h>

Collaboration diagram for miosix::Lock:

Collaboration graph

List of all members.

Public Member Functions

 Lock (Mutex &m)
 ~Lock ()
Mutexget ()

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.

Constructor & Destructor Documentation

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

Constructor: locks the mutex

m mutex to lock

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

Destructor: unlocks the mutex

Member Function Documentation

Mutex& miosix::Lock::get (  )  [inline]

the locked mutex

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

Generated on Mon Aug 30 00:05:00 2010 for Miosix by  doxygen 1.5.9