File mutex.hpp¶
This file implements a real time safe mutex with the dedicated libraries. The API tries to fit the std API as much as possible.
- Author
Maximilien Naveau license License BSD-3-Clause
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft.
- Date
2019-11-19
Defines
-
rt_printf
¶
-
namespace
real_time_tools
Typedefs
-
typedef std::mutex *
RealTimeMutex_t
¶ Alias for the real time mutex.
-
typedef std::condition_variable
rt_cond
¶ Alias for the real time condition variable.
-
class
RealTimeMutex
- #include <mutex.hpp>
This class uses the real-time API of xenomai and posix to implement mutexes.
Public Functions
-
inline
RealTimeMutex
(std::string mutex_id = "") Construct a new RealTimeMutex object.
-
inline
~RealTimeMutex
() Destroy the RealTimeMutex object.
-
inline void
lock
() lock the mutex.
-
inline void
unlock
() unlock the mutex
Private Members
-
RealTimeMutex_t
mutex_
This is the object which type chenge according to the OS this code is compiled.
-
std::string
mutex_id_
Save the mutex id internally.
-
inline
-
typedef std::mutex *