1#ifndef OS_WRAPPER_MUTEX_H_INCLUDED
2#define OS_WRAPPER_MUTEX_H_INCLUDED
RAII wrapper of Mutex.
Definition Mutex.h:99
~LockGuard()
Destructor of LockGuard.
Definition Mutex.cpp:50
static const AdoptLock ADOPT_LOCK
Used as argument of LockGuard's constructor.
Definition Mutex.h:102
Abstract class that has functions of common RTOS's mutex.
Definition Mutex.h:22
virtual Error lock()=0
Block the current thread until locks this mutex.
static Mutex * create()
Create a Mutex object.
Definition Mutex.cpp:14
virtual Error timedLock(Timeout tmout)=0
Block the current thread until locks this mutex but only within the limited time.
static void destroy(Mutex *m)
Destroy a Mutex object.
Definition Mutex.cpp:26
virtual Error tryLock()=0
Try to lock this mutex without blocking.
virtual Error unlock()=0
Unlock this mutex that the current thread locks.
virtual ~Mutex()
Definition Mutex.h:24
Value object for the timeout.
Definition Timeout.h:11
OSWrapper provides abstract C++ interface of common RTOS: thread, mutex, event flag,...
Definition EventFlag.cpp:5
void registerMutexFactory(MutexFactory *factory)
Register the MutexFactory.
Definition Mutex.cpp:9
Error
Kinds of errors of the OS objects.
Definition OSWrapperError.h:9