using ExecImplPtr = boost::intrusive_ptr<ExecImpl>;
class IoImpl;
using IoImplPtr = boost::intrusive_ptr<IoImpl>;
+ class MutexImpl;
+ using MutexImplPtr = boost::intrusive_ptr<MutexImpl>;
class RawImpl;
using RawImplPtr = boost::intrusive_ptr<RawImpl>;
class SleepImpl;
using ActorImplPtr = boost::intrusive_ptr<ActorImpl>;
class Host;
- class MutexImpl;
}
namespace surf {
class Resource;
typedef simgrid::kernel::context::Context* smx_context_t;
typedef simgrid::simix::ActorImpl* smx_actor_t;
-typedef simgrid::simix::MutexImpl* smx_mutex_t;
+typedef simgrid::kernel::activity::MutexImpl* smx_mutex_t;
typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t;
typedef simgrid::surf::StorageImpl* surf_storage_t;
*/
XBT_PUBLIC_CLASS Mutex {
friend ConditionVariable;
- friend simgrid::simix::MutexImpl;
- simgrid::simix::MutexImpl* mutex_;
- explicit Mutex(simgrid::simix::MutexImpl * mutex) : mutex_(mutex) {}
+ friend simgrid::kernel::activity::MutexImpl;
+ simgrid::kernel::activity::MutexImpl* mutex_;
+ explicit Mutex(simgrid::kernel::activity::MutexImpl * mutex) : mutex_(mutex) {}
/* refcounting of the intrusive_ptr is delegated to the implementation object */
friend void intrusive_ptr_add_ref(Mutex* mutex)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "smx_private.hpp"
-#include "src/surf/cpu_interface.hpp"
-#include "src/surf/surf_interface.hpp"
-#include <xbt/ex.hpp>
-#include <xbt/log.h>
-#include <xbt/utility.hpp>
-
+#include "src/kernel/activity/MutexImpl.hpp"
#include "src/kernel/activity/SynchroRaw.hpp"
-#include "src/simix/MutexImpl.hpp"
+
+#include "src/simix/smx_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_mutex, simix_synchro, "Mutex kernel-space implementation");
namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
MutexImpl::MutexImpl() : mutex_(this)
{
}
}
}
+}
/** Increase the refcount for this mutex */
smx_mutex_t SIMIX_mutex_ref(smx_mutex_t mutex)
#include <boost/intrusive/list.hpp>
namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
class XBT_PUBLIC() MutexImpl {
public:
};
}
}
+}
#endif /* SIMIX_MUTEXIMPL_HPP */
#include "src/mc/mc_replay.hpp"
#include "src/simix/smx_private.hpp"
-#include "src/simix/MutexImpl.hpp"
+#include "src/kernel/activity/MutexImpl.hpp"
#if SIMGRID_HAVE_MC
#include "src/mc/ModelChecker.hpp"
#include <cassert>
#include "src/include/mc/mc.h"
+#include "src/kernel/activity/MutexImpl.hpp"
#include "src/mc/ModelChecker.hpp"
#include "src/mc/mc_request.hpp"
#include "src/mc/mc_smx.hpp"
else
type = "Mutex TRYLOCK";
- simgrid::mc::Remote<simgrid::simix::MutexImpl> mutex;
+ simgrid::mc::Remote<simgrid::kernel::activity::MutexImpl> mutex;
mc_model_checker->process().read_bytes(mutex.getBuffer(), sizeof(mutex),
remote(
req->call == SIMCALL_MUTEX_LOCK
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u/Mutex.hpp"
-#include "src/simix/MutexImpl.hpp"
+#include "src/kernel/activity/MutexImpl.hpp"
namespace simgrid {
namespace s4u {
#include "simgrid/simix/blocking_simcall.hpp"
#include "smx_private.hpp"
#include "src/kernel/activity/CommImpl.hpp"
+#include "src/kernel/activity/MutexImpl.hpp"
#include "src/mc/mc_forward.hpp"
#include "src/mc/mc_replay.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
-#include "src/simix/MutexImpl.hpp"
#include "src/simix/smx_host_private.hpp"
#include "xbt/ex.h"
#include "xbt/functional.hpp"
fprintf(stderr,"You must run MSG_init before using MSG\n"); // We can't use xbt_die since we may get there before the initialization
xbt_abort();
}
- return simgrid::simix::kernelImmediate([] { return new simgrid::simix::MutexImpl(); });
+ return simgrid::simix::kernelImmediate([] { return new simgrid::kernel::activity::MutexImpl(); });
}
/**
#include <xbt/log.h>
#include <xbt/utility.hpp>
+#include "src/kernel/activity/MutexImpl.hpp"
#include "src/kernel/activity/SynchroRaw.hpp"
-#include "src/simix/MutexImpl.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix, "SIMIX Synchronization (mutex, semaphores and conditions)");