1/*
2 Copyright (c) 2005-2021 Intel Corporation
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#ifndef _TBB_detail__intrusive_list_node_H
18#define _TBB_detail__intrusive_list_node_H
19
20namespace tbb {
21namespace detail {
22namespace d1 {
23
24//! Data structure to be inherited by the types that can form intrusive lists.
25/** Intrusive list is formed by means of the member_intrusive_list<T> template class.
26 Note that type T must derive from intrusive_list_node either publicly or
27 declare instantiation member_intrusive_list<T> as a friend.
28 This class implements a limited subset of std::list interface. **/
29struct intrusive_list_node {
30 intrusive_list_node* my_prev_node{};
31 intrusive_list_node* my_next_node{};
32#if TBB_USE_ASSERT
33 intrusive_list_node() { my_prev_node = my_next_node = this; }
34#endif /* TBB_USE_ASSERT */
35};
36
37} // namespace d1
38} // namespace detail
39} // namespace tbb
40
41#endif // _TBB_detail__intrusive_list_node_H
42

source code of include/oneapi/tbb/detail/_intrusive_list_node.h