1 /* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "src/kernel/activity/ActivityImpl.hpp"
8 XBT_LOG_EXTERNAL_CATEGORY(simix_network);
14 ActivityImpl::ActivityImpl() = default;
15 ActivityImpl::~ActivityImpl() = default;
17 void ActivityImpl::ref()
19 xbt_assert(refcount_ >= 0);
21 XBT_CDEBUG(simix_network, "%p->refcount++ ~> %d", this, (int)refcount_);
22 if (XBT_LOG_ISENABLED(simix_network, xbt_log_priority_trace))
23 xbt_backtrace_display_current();
26 void ActivityImpl::unref()
28 XBT_CDEBUG(simix_network, "%p->refcount-- ~> %d", this, ((int)refcount_) - 1);
29 xbt_assert(refcount_ >= 0);
31 if (XBT_LOG_ISENABLED(simix_network, xbt_log_priority_trace))
32 xbt_backtrace_display_current();
37 // boost::intrusive_ptr<Activity> support:
38 void intrusive_ptr_add_ref(simgrid::kernel::activity::ActivityImpl* activity)
43 void intrusive_ptr_release(simgrid::kernel::activity::ActivityImpl* activity)
49 } // namespace simgrid::kernel::activity::