]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/asio/detail/null_signal_blocker.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / asio / detail / null_signal_blocker.hpp
1 //
2 // detail/null_signal_blocker.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10
11 #ifndef BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP
12 #define BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP
13
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18 #include <boost/asio/detail/config.hpp>
19
20 #if !defined(BOOST_ASIO_HAS_THREADS) \
21 || defined(BOOST_ASIO_WINDOWS) \
22 || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
23 || defined(__CYGWIN__) \
24 || defined(__SYMBIAN32__)
25
26 #include <boost/asio/detail/noncopyable.hpp>
27
28 #include <boost/asio/detail/push_options.hpp>
29
30 namespace boost {
31 namespace asio {
32 namespace detail {
33
34 class null_signal_blocker
35 : private noncopyable
36 {
37 public:
38 // Constructor blocks all signals for the calling thread.
39 null_signal_blocker()
40 {
41 }
42
43 // Destructor restores the previous signal mask.
44 ~null_signal_blocker()
45 {
46 }
47
48 // Block all signals for the calling thread.
49 void block()
50 {
51 }
52
53 // Restore the previous signal mask.
54 void unblock()
55 {
56 }
57 };
58
59 } // namespace detail
60 } // namespace asio
61 } // namespace boost
62
63 #include <boost/asio/detail/pop_options.hpp>
64
65 #endif // !defined(BOOST_ASIO_HAS_THREADS)
66 // || defined(BOOST_ASIO_WINDOWS)
67 // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
68 // || defined(__CYGWIN__)
69 // || defined(__SYMBIAN32__)
70
71 #endif // BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP