mn_mutex.hpp
Go to the documentation of this file.
1 
19 #ifndef MINLIB_ESP32_MUTEX_
20 #define MINLIB_ESP32_MUTEX_
21 
22 #include "mn_config.hpp"
23 #include "mn_def.hpp"
24 
25 #include "mn_basic_semaphore.hpp"
26 #include "mn_error.hpp"
27 
28 namespace mn {
37  class basic_mutex : public basic_semaphore {
38  public:
48  basic_mutex();
49  basic_mutex(const basic_mutex& other);
53  virtual ~basic_mutex();
54 
62  virtual int lock(unsigned int timeout = MN_THREAD_CONFIG_TIMEOUT_MUTEX_DEFAULT);
63 
70  virtual int unlock();
71  };
72 
73 
74 
75 
77 }
78 
79 
80 #endif
Definition: mn_mutex.hpp:37
basic_mutex()
Definition: mn_mutex.cpp:32
virtual ~basic_mutex()
Definition: mn_mutex.cpp:54
virtual int unlock()
Definition: mn_mutex.cpp:84
virtual int lock(unsigned int timeout=MN_THREAD_CONFIG_TIMEOUT_MUTEX_DEFAULT)
Definition: mn_mutex.cpp:62
Definition: mn_basic_semaphore.hpp:41
#define MN_THREAD_CONFIG_TIMEOUT_MUTEX_DEFAULT
Definition: mn_config.hpp:368
A list of all error codes in this lib. This file is part of the Mini Thread Library (https://github....
Definition: mn_allocator_typetraits.hpp:25