namespace kernel {
namespace activity {
-MutexImpl::MutexImpl() : piface_(this)
-{
- XBT_IN("(%p)", this);
- XBT_OUT();
-}
-
-MutexImpl::~MutexImpl()
-{
- XBT_IN("(%p)", this);
- XBT_OUT();
-}
-
void MutexImpl::lock(actor::ActorImpl* issuer)
{
XBT_IN("(%p; %p)", this, issuer);
if (locked_) {
/* FIXME: check if the host is active ? */
/* Somebody using the mutex, use a synchronization to get host failures */
- synchro = RawImplPtr(new RawImpl())->start(issuer->get_host(), -1);
+ synchro = RawImplPtr(new RawImpl());
+ (*synchro).set_host(issuer->get_host()).start();
synchro->simcalls_.push_back(&issuer->simcall);
issuer->waiting_synchro = synchro;
sleeping_.push_back(*issuer);