Mutex.hpp 536 B

123456789101112131415161718192021222324
  1. #ifndef _Mutex_hpp_
  2. #define _Mutex_hpp_
  3. #include <FpConfig.hpp>
  4. namespace Os {
  5. class Mutex {
  6. public:
  7. Mutex(); //!< Constructor. Mutex is unlocked when created
  8. virtual ~Mutex(); //!< Destructor
  9. void lock(); //!< lock the mutex
  10. void unLock(); //!< unlock the mutex
  11. void unlock() { this->unLock(); } //!< alias for unLock to meet BasicLockable requirements
  12. private:
  13. POINTER_CAST m_handle; //!< Stored handle to mutex
  14. };
  15. }
  16. #endif