]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/atomic/test/wait_api.cpp
1 // Copyright (c) 2020 Andrey Semashev
3 // Distributed under the Boost Software License, Version 1.0.
4 // See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #include <boost/atomic/atomic.hpp>
8 #include <boost/atomic/atomic_flag.hpp>
9 #include <boost/atomic/capabilities.hpp>
11 #include <boost/config.hpp>
12 #include <boost/cstdint.hpp>
14 #include "wait_test_helpers.hpp"
16 int main(int, char *[])
18 test_flag_wait_notify_api();
20 test_wait_notify_api
< atomic_wrapper
, boost::uint8_t >(1, 2, 3);
21 test_wait_notify_api
< atomic_wrapper
, boost::uint16_t >(1, 2, 3);
22 test_wait_notify_api
< atomic_wrapper
, boost::uint32_t >(1, 2, 3);
23 test_wait_notify_api
< atomic_wrapper
, boost::uint64_t >(1, 2, 3);
24 #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128)
25 test_wait_notify_api
< atomic_wrapper
, boost::uint128_type
>(1, 2, 3);
29 struct_3_bytes s1
= {{ 1 }};
30 struct_3_bytes s2
= {{ 2 }};
31 struct_3_bytes s3
= {{ 3 }};
32 test_wait_notify_api
< atomic_wrapper
, struct_3_bytes
>(s1
, s2
, s3
);
35 large_struct s1
= {{ 1 }};
36 large_struct s2
= {{ 2 }};
37 large_struct s3
= {{ 3 }};
38 test_wait_notify_api
< atomic_wrapper
, large_struct
>(s1
, s2
, s3
);
41 return boost::report_errors();