Miosix  2.0alpha1
miosix::FastMutex Class Reference

#include <sync.h>

Public Types

enum  Options { DEFAULT, RECURSIVE }
 

Public Member Functions

 FastMutex (Options opt=DEFAULT)
 
void lock ()
 
bool tryLock ()
 
void unlock ()
 
 ~FastMutex ()
 

Detailed Description

Fast mutex without support for priority inheritance

Constructor & Destructor Documentation

miosix::FastMutex::FastMutex ( Options  opt = DEFAULT)
inline

Constructor, initializes the mutex.

miosix::FastMutex::~FastMutex ( )
inline

Destructor

Member Function Documentation

void miosix::FastMutex::lock ( )
inline

Locks the critical section. If the critical section is already locked, the thread will be queued in a wait list.

bool miosix::FastMutex::tryLock ( )
inline

Acquires the lock only if the critical section is not already locked by other threads. Attempting to lock again a recursive mutex will fail, and the mutex' lock count will not be incremented.

Returns
true if the lock was acquired
void miosix::FastMutex::unlock ( )
inline

Unlocks the critical section.


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