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"
12 ActivityImpl::ActivityImpl() = default;
13 ActivityImpl::~ActivityImpl() = default;
15 void ActivityImpl::ref()
17 // Atomic operation! Do not split in two instructions!
18 xbt_assert(refcount_ != 0);
22 void ActivityImpl::unref()
24 xbt_assert(refcount_ > 0,
25 "This activity has a negative refcount! You can only call test() or wait() once per activity.");
31 // boost::intrusive_ptr<Activity> support:
32 void intrusive_ptr_add_ref(simgrid::kernel::activity::ActivityImpl* activity)
37 void intrusive_ptr_release(simgrid::kernel::activity::ActivityImpl* activity)
43 } // namespace simgrid::kernel::activity::