MHVLib  20111011
An efficiency oriented runtime library for AVR microcontrollers
A:/eclipse/mhvlib/MHV_Lock.h
Go to the documentation of this file.
00001 /*
00002  * MHV_Lock.h
00003  *
00004  */
00005 
00006 #ifndef MHV_LOCK_H_
00007 #define MHV_LOCK_H_
00008 #include <util/atomic.h>
00009 
00010 class MHV_Lock {
00011 private:
00012         volatile bool   _lock;
00013 
00014 public:
00015         MHV_Lock();
00016         bool obtain();
00017         void release();
00018         bool check();
00019 };
00020 
00021 #endif /* MHV_LOCK_H_ */