Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
pointer2const4sonar
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 9 Feb 2022 12:55:02 +0000 (13:55 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 9 Feb 2022 13:00:05 +0000 (14:00 +0100)
src/kernel/resource/VirtualMachineImpl.cpp
src/kernel/resource/VirtualMachineImpl.hpp
src/s4u/s4u_Host.cpp

index a30d3a2..ae03dc3 100644 (file)
@@ -205,7 +205,7 @@ void VirtualMachineImpl::vm_destroy()
   xbt_assert(ret, "Bug: some resource still remains");
 }
 
-void VirtualMachineImpl::suspend(smx_actor_t issuer)
+void VirtualMachineImpl::suspend(const actor::ActorImpl* issuer)
 {
   if (vm_state_ != s4u::VirtualMachine::State::RUNNING)
     throw VmFailureException(XBT_THROW_POINT,
@@ -253,7 +253,7 @@ void VirtualMachineImpl::resume()
  *
  * @param issuer the actor requesting the shutdown
  */
-void VirtualMachineImpl::shutdown(smx_actor_t issuer)
+void VirtualMachineImpl::shutdown(actor::ActorImpl* issuer)
 {
   if (vm_state_ != s4u::VirtualMachine::State::RUNNING)
     XBT_VERB("Shutting down the VM %s even if it's not running but in state %s", piface_->get_cname(),
index 9a37769..fc8672a 100644 (file)
@@ -32,7 +32,7 @@ public:
   explicit VirtualMachineImpl(const std::string& name, s4u::VirtualMachine* piface, s4u::Host* host, int core_amount,
                               size_t ramsize);
 
-  void suspend(actor::ActorImpl* issuer);
+  void suspend(const actor::ActorImpl* issuer);
   void resume();
   void shutdown(kernel::actor::ActorImpl* issuer);
   void vm_destroy();
index 0b81ba1..53d3418 100644 (file)
@@ -79,7 +79,7 @@ Host* Host::by_name_or_null(const std::string& name)
 
 Host* Host::current()
 {
-  kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
+  const kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
   xbt_assert(self != nullptr, "Cannot call Host::current() from the maestro context");
   return self->get_host();
 }