Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Convert integer literals to bool literals.
[simgrid.git] / src / simix / libsmx.cpp
index d0646d9..86e74da 100644 (file)
@@ -29,8 +29,8 @@
  *
  * @param execution The execution synchro
  */
-e_smx_state_t simcall_execution_wait(simgrid::kernel::activity::ActivityImpl* execution,
-                                     double timeout) // XBT_ATTRIB_DEPRECATED_v330
+simgrid::kernel::activity::State simcall_execution_wait(simgrid::kernel::activity::ActivityImpl* execution,
+                                                        double timeout) // XBT_ATTRIB_DEPRECATED_v330
 {
   simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
   simgrid::kernel::actor::simcall_blocking<void>(
@@ -38,8 +38,8 @@ e_smx_state_t simcall_execution_wait(simgrid::kernel::activity::ActivityImpl* ex
   return simgrid::kernel::activity::State::DONE;
 }
 
-e_smx_state_t simcall_execution_wait(const simgrid::kernel::activity::ActivityImplPtr& execution,
-                                     double timeout) // XBT_ATTRIB_DEPRECATED_v330
+simgrid::kernel::activity::State simcall_execution_wait(const simgrid::kernel::activity::ActivityImplPtr& execution,
+                                                        double timeout) // XBT_ATTRIB_DEPRECATED_v330
 {
   simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
   simgrid::kernel::actor::simcall_blocking<void>(
@@ -72,7 +72,7 @@ void simcall_process_suspend(smx_actor_t process) // XBT_DEPRECATED_v328
   process->iface()->suspend();
 }
 
-e_smx_state_t simcall_process_sleep(double duration) // XBT_DEPRECATED_v329
+simgrid::kernel::activity::State simcall_process_sleep(double duration) // XBT_ATTRIB_DEPRECATED_v329
 {
   simgrid::kernel::actor::ActorImpl::self()->sleep(duration);
   return simgrid::kernel::activity::State::DONE;
@@ -97,8 +97,8 @@ void simcall_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size,
     /* the model-checker wants two separate simcalls */
     simgrid::kernel::activity::ActivityImplPtr comm =
         nullptr; /* MC needs the comm to be set to nullptr during the simcall */
-    comm = simcall_comm_isend(sender, mbox, task_size, rate,
-        src_buff, src_buff_size, match_fun, nullptr, copy_data_fun, data, 0);
+    comm = simcall_comm_isend(sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, nullptr, copy_data_fun,
+                              data, false);
     simcall_comm_wait(comm.get(), timeout);
     comm = nullptr;
   }
@@ -323,15 +323,16 @@ int simcall_sem_acquire_timeout(smx_sem_t sem, double timeout)
   return simcall_BODY_sem_acquire_timeout(sem, timeout);
 }
 
-e_smx_state_t simcall_io_wait(simgrid::kernel::activity::ActivityImpl* io, double timeout) // XBT_ATTRIB_DEPRECATED_v330
+simgrid::kernel::activity::State simcall_io_wait(simgrid::kernel::activity::ActivityImpl* io,
+                                                 double timeout) // XBT_ATTRIB_DEPRECATED_v330
 {
   simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
   simgrid::kernel::actor::simcall_blocking<void>([io, issuer, timeout] { io->wait_for(issuer, timeout); });
   return simgrid::kernel::activity::State::DONE;
 }
 
-e_smx_state_t simcall_io_wait(const simgrid::kernel::activity::ActivityImplPtr& io,
-                              double timeout) // XBT_ATTRIB_DEPRECATED_v330
+simgrid::kernel::activity::State simcall_io_wait(const simgrid::kernel::activity::ActivityImplPtr& io,
+                                                 double timeout) // XBT_ATTRIB_DEPRECATED_v330
 {
   simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
   simgrid::kernel::actor::simcall_blocking<void>([io, issuer, timeout] { io->wait_for(issuer, timeout); });
@@ -350,13 +351,13 @@ bool simcall_io_test(const simgrid::kernel::activity::ActivityImplPtr& io) // XB
 
 void simcall_run_kernel(std::function<void()> const& code, simgrid::mc::SimcallInspector* t)
 {
-  simgrid::kernel::actor::ActorImpl::self()->simcall.inspector_ = t;
+  simgrid::kernel::actor::ActorImpl::self()->simcall_.inspector_ = t;
   simcall_BODY_run_kernel(&code);
 }
 
 void simcall_run_blocking(std::function<void()> const& code, simgrid::mc::SimcallInspector* t = nullptr)
 {
-  simgrid::kernel::actor::ActorImpl::self()->simcall.inspector_ = t;
+  simgrid::kernel::actor::ActorImpl::self()->simcall_.inspector_ = t;
   simcall_BODY_run_blocking(&code);
 }