Chris@16
|
1 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
2 //
|
Chris@16
|
3 // (C) Copyright Ion Gaztanaga 2007-2012. Distributed under the Boost
|
Chris@16
|
4 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 //
|
Chris@16
|
7 // See http://www.boost.org/libs/interprocess for documentation.
|
Chris@16
|
8 //
|
Chris@16
|
9 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
10
|
Chris@16
|
11 #ifndef BOOST_INTERPROCESS_DETAIL_NODE_TOOLS_HPP
|
Chris@16
|
12 #define BOOST_INTERPROCESS_DETAIL_NODE_TOOLS_HPP
|
Chris@16
|
13
|
Chris@101
|
14 #ifndef BOOST_CONFIG_HPP
|
Chris@101
|
15 # include <boost/config.hpp>
|
Chris@101
|
16 #endif
|
Chris@101
|
17 #
|
Chris@101
|
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
|
Chris@16
|
19 # pragma once
|
Chris@16
|
20 #endif
|
Chris@16
|
21
|
Chris@16
|
22 #include <boost/interprocess/detail/config_begin.hpp>
|
Chris@16
|
23 #include <boost/interprocess/detail/workaround.hpp>
|
Chris@16
|
24
|
Chris@16
|
25 #include <boost/intrusive/slist.hpp>
|
Chris@16
|
26
|
Chris@16
|
27 namespace boost {
|
Chris@16
|
28 namespace interprocess {
|
Chris@16
|
29 namespace ipcdetail {
|
Chris@16
|
30
|
Chris@16
|
31
|
Chris@16
|
32 template<class VoidPointer>
|
Chris@16
|
33 struct node_slist
|
Chris@16
|
34 {
|
Chris@16
|
35 //This hook will be used to chain the individual nodes
|
Chris@16
|
36 typedef typename bi::make_slist_base_hook
|
Chris@16
|
37 <bi::void_pointer<VoidPointer>, bi::link_mode<bi::normal_link> >::type slist_hook_t;
|
Chris@16
|
38
|
Chris@16
|
39 //A node object will hold node_t when it's not allocated
|
Chris@16
|
40 struct node_t
|
Chris@16
|
41 : public slist_hook_t
|
Chris@16
|
42 {};
|
Chris@16
|
43
|
Chris@16
|
44 typedef typename bi::make_slist
|
Chris@16
|
45 <node_t, bi::linear<true>, bi::base_hook<slist_hook_t> >::type node_slist_t;
|
Chris@16
|
46 };
|
Chris@16
|
47
|
Chris@16
|
48 } //namespace ipcdetail {
|
Chris@16
|
49 } //namespace interprocess {
|
Chris@16
|
50 } //namespace boost {
|
Chris@16
|
51
|
Chris@16
|
52 #include <boost/interprocess/detail/config_end.hpp>
|
Chris@16
|
53
|
Chris@16
|
54 #endif //#ifndef BOOST_INTERPROCESS_DETAIL_NODE_TOOLS_HPP
|