1 //
2 // spinlock_pool_test.cpp
3 //
4 // Copyright 2008 Peter Dimov
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt
9 //
10 
11 #include <boost/smart_ptr/detail/spinlock_pool.hpp>
12 
13 // Sanity check only
14 
main()15 int main()
16 {
17     int x = 0;
18 
19     {
20         boost::detail::spinlock_pool<0>::scoped_lock lock( &x );
21         ++x;
22     }
23 
24     {
25         boost::detail::spinlock_pool<1>::scoped_lock lock( &x );
26         boost::detail::spinlock_pool<2>::scoped_lock lock2( &x );
27     }
28 
29     return 0;
30 }
31