ros2_control - jazzy
Loading...
Searching...
No Matches
realtime_box.hpp
1// Copyright (c) 2009, Willow Garage, Inc.
2// Copyright (c) 2024, Lennart Nachtigall
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are met:
6//
7// * Redistributions of source code must retain the above copyright
8// notice, this list of conditions and the following disclaimer.
9//
10// * Redistributions in binary form must reproduce the above copyright
11// notice, this list of conditions and the following disclaimer in the
12// documentation and/or other materials provided with the distribution.
13//
14// * Neither the name of the Willow Garage, Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28// POSSIBILITY OF SUCH DAMAGE.
29
30// Author: Stuart Glaser
31// Author: Lennart Nachtigall
32
33#ifndef REALTIME_TOOLS__REALTIME_BOX_HPP_
34#define REALTIME_TOOLS__REALTIME_BOX_HPP_
35
36#include "realtime_tools/realtime_thread_safe_box.hpp"
37
38// Deprecation notice
39#pragma message( \
40 "'RealtimeBox' is deprecated. Please update your code to use 'realtime_thread_safe_box.hpp' header, and class name 'RealtimeThreadSafeBox' instead.") //NOLINT
41
42namespace realtime_tools
43{
44
45// Provide backward-compatibility for the old RealtimeBox class
46template <class T, typename mutex_type = std::mutex>
47using RealtimeBoxBase = RealtimeThreadSafeBox<T, mutex_type>;
48
49template <typename T>
50using RealtimeBoxStandard = RealtimeBoxBase<T, std::mutex>;
51
52template <typename T>
53using RealtimeBoxRecursive = RealtimeBoxBase<T, std::recursive_mutex>;
54
55template <typename T>
56using RealtimeBox = RealtimeBoxStandard<T>;
57
58// Only kept for compatibility reasons
59template <typename T, typename mutex_type = std::mutex>
60using RealtimeBoxBestEffort [[deprecated("Use RealtimeBox instead")]] =
61 RealtimeBoxBase<T, mutex_type>;
62
63} // namespace realtime_tools
64
65#endif // REALTIME_TOOLS__REALTIME_BOX_HPP_
A pthread mutex wrapper that provides a mutex with the priority inheritance protocol and a priority c...
Definition async_function_handler.hpp:38