sttcl  v0.9c
STTCL C++ template state machine framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SttclBoostMutex.h
Go to the documentation of this file.
1 
25 #ifndef STTCLBOOSTMUTEX_H_
26 #define STTCLBOOSTMUTEX_H_
27 
28 #if defined(STTCL_BOOST_THREADS) or defined(STTCL_BOOST_IMPL)
29 #include <boost/thread.hpp>
30 #include "../include/SttclTime.h"
31 
32 namespace sttcl
33 {
34 
35 namespace internal
36 {
37 namespace boost_impl
38 {
42 class SttclBoostMutex
43 {
44 public:
45  typedef boost::timed_mutex NativeMutexType;
46  SttclBoostMutex();
47  virtual ~SttclBoostMutex();
48 
49  void lock();
50  bool try_lock(const TimeDuration<>& timeout);
51  void unlock();
52 
53 private:
54  NativeMutexType mutex;
55 };
56 
57 }
58 }
59 }
60 
61 #endif
62 #endif /* STTCLBOOSTMUTEX_H_ */