2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief intrusive_refcount inline non-template implementation */
17 //#include "intrusive_refcount.ih"
20 #include "senfassert.hh"
22 #define prefix_ inline
23 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 prefix_ senf::intrusive_refcount_base::~intrusive_refcount_base()
28 prefix_ senf::intrusive_refcount_base::refcount_t senf::intrusive_refcount_base::refcount()
34 prefix_ bool senf::intrusive_refcount_base::is_shared()
40 prefix_ senf::intrusive_refcount_base::intrusive_refcount_base()
44 prefix_ void senf::intrusive_refcount_base::add_ref()
49 prefix_ bool senf::intrusive_refcount_base::release()
51 SENF_ASSERT(refcount_>0,
52 "senf::intrusive_refcount_base: Internal inconsistency: "
53 "Calling release on dead object.");
54 return --refcount_ == 0;
57 prefix_ senf::intrusive_refcount::intrusive_refcount()
60 //-/////////////////////////////////////////////////////////////////////////////////////////////////
67 // c-file-style: "senf"
68 // indent-tabs-mode: nil
69 // ispell-local-dictionary: "american"
70 // compile-command: "scons -u test"