miosix::Unlock Class Reference
[Syncronization]

#include <sync.h>

Collaboration diagram for miosix::Unlock:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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


Detailed Description

This class allows to temporarily re unlock a mutex in a scope where it is locked
Example:
 Mutex m;

 //Mutex unlocked
 {
     Lock dLock(m);

     //Now mutex locked

     {
         Unlock eLock(dLock);

         //Now mutex back unlocked
     }

     //Now mutex again locked
 }
 //Finally mutex unlocked

Constructor & Destructor Documentation

miosix::Unlock::Unlock ( Lock l  )  [inline]

Constructor, unlock mutex.

Parameters:
l the Lock that locked the mutex.

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

Constructor, unlock mutex.

Parameters:
m a locked mutex.

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

Destructor. Disable back interrupts.


Member Function Documentation

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

Returns:
the unlocked 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