Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate e_smx_state_t.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 10 Feb 2020 15:08:38 +0000 (16:08 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 10 Feb 2020 15:08:38 +0000 (16:08 +0100)
include/simgrid/forward.h
include/simgrid/simix.h
src/simix/libsmx.cpp

index 608bd91..e7268b8 100644 (file)
@@ -216,7 +216,7 @@ typedef simgrid::kernel::activity::ConditionVariableImpl* smx_cond_t;
 typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t;
 typedef simgrid::kernel::activity::MutexImpl* smx_mutex_t;
 typedef simgrid::kernel::activity::SemaphoreImpl* smx_sem_t;
 typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t;
 typedef simgrid::kernel::activity::MutexImpl* smx_mutex_t;
 typedef simgrid::kernel::activity::SemaphoreImpl* smx_sem_t;
-typedef simgrid::kernel::activity::State e_smx_state_t;
+XBT_ATTRIB_DEPRECATED_v330("Please use kernel::activity::State") typedef simgrid::kernel::activity::State e_smx_state_t;
 #else
 
 typedef struct s4u_Actor s4u_Actor;
 #else
 
 typedef struct s4u_Actor s4u_Actor;
@@ -233,7 +233,7 @@ typedef struct s4u_Disk s4u_Disk;
 typedef struct s4u_Storage s4u_Storage;
 typedef struct s4u_NetZone s4u_NetZone;
 typedef struct s4u_VM s4u_VM;
 typedef struct s4u_Storage s4u_Storage;
 typedef struct s4u_NetZone s4u_NetZone;
 typedef struct s4u_VM s4u_VM;
-typedef enum kernel_activity_state e_smx_state_t;
+XBT_ATTRIB_DEPRECATED_v330("Please stop using this type alias") typedef enum kernel_activity_state e_smx_state_t;
 
 typedef struct s_smx_timer* smx_timer_t;
 typedef struct s_smx_actor* smx_actor_t;
 
 typedef struct s_smx_timer* smx_timer_t;
 typedef struct s_smx_actor* smx_actor_t;
index ac4b4fe..1ab0b93 100644 (file)
@@ -114,9 +114,9 @@ XBT_PUBLIC void SIMIX_comm_copy_buffer_callback(simgrid::kernel::activity::CommI
 
 /******************************* Host simcalls ********************************/
 #ifdef __cplusplus
 
 /******************************* Host simcalls ********************************/
 #ifdef __cplusplus
-XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Exec::wait_for()") XBT_PUBLIC e_smx_state_t
+XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Exec::wait_for()") XBT_PUBLIC simgrid::kernel::activity::State
     simcall_execution_wait(simgrid::kernel::activity::ActivityImpl* execution, double timeout);
     simcall_execution_wait(simgrid::kernel::activity::ActivityImpl* execution, double timeout);
-XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Exec::wait_for()") XBT_PUBLIC e_smx_state_t
+XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Exec::wait_for()") XBT_PUBLIC simgrid::kernel::activity::State
     simcall_execution_wait(const simgrid::kernel::activity::ActivityImplPtr& execution, double timeout);
 XBT_PUBLIC unsigned int simcall_execution_waitany_for(simgrid::kernel::activity::ExecImpl* execs[], size_t count,
                                                       double timeout);
     simcall_execution_wait(const simgrid::kernel::activity::ActivityImplPtr& execution, double timeout);
 XBT_PUBLIC unsigned int simcall_execution_waitany_for(simgrid::kernel::activity::ExecImpl* execs[], size_t count,
                                                       double timeout);
@@ -137,7 +137,12 @@ XBT_ATTRIB_DEPRECATED_v328("Please use sg_actor_suspend()") XBT_PUBLIC
 XBT_ATTRIB_DEPRECATED_v328("Please use sg_actor_join()") XBT_PUBLIC
     void simcall_process_join(smx_actor_t process, double timeout);
 
 XBT_ATTRIB_DEPRECATED_v328("Please use sg_actor_join()") XBT_PUBLIC
     void simcall_process_join(smx_actor_t process, double timeout);
 
-XBT_ATTRIB_DEPRECATED_v329("Please use sg_actor_sleep_for()") XBT_PUBLIC e_smx_state_t
+XBT_ATTRIB_DEPRECATED_v329("Please use sg_actor_sleep_for()") XBT_PUBLIC
+#ifdef __cplusplus
+    simgrid::kernel::activity::State
+#else
+    enum kernel_activity_state
+#endif
     simcall_process_sleep(double duration);
 SG_END_DECL
 
     simcall_process_sleep(double duration);
 SG_END_DECL
 
@@ -209,9 +214,9 @@ SG_END_DECL
 
 /*****************************   Io   **************************************/
 #ifdef __cplusplus
 
 /*****************************   Io   **************************************/
 #ifdef __cplusplus
-XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Io::wait_for()") XBT_PUBLIC e_smx_state_t
+XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Io::wait_for()") XBT_PUBLIC simgrid::kernel::activity::State
     simcall_io_wait(simgrid::kernel::activity::ActivityImpl* io, double timeout);
     simcall_io_wait(simgrid::kernel::activity::ActivityImpl* io, double timeout);
-XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Io::wait_for()") XBT_PUBLIC e_smx_state_t
+XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Io::wait_for()") XBT_PUBLIC simgrid::kernel::activity::State
     simcall_io_wait(const simgrid::kernel::activity::ActivityImplPtr& io, double timeout);
 XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Io::test()") XBT_PUBLIC
     bool simcall_io_test(simgrid::kernel::activity::ActivityImpl* io);
     simcall_io_wait(const simgrid::kernel::activity::ActivityImplPtr& io, double timeout);
 XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Io::test()") XBT_PUBLIC
     bool simcall_io_test(simgrid::kernel::activity::ActivityImpl* io);
index d0646d9..8d915db 100644 (file)
@@ -29,8 +29,8 @@
  *
  * @param execution The execution synchro
  */
  *
  * @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>(
 {
   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;
 }
 
   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>(
 {
   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();
 }
 
   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;
 {
   simgrid::kernel::actor::ActorImpl::self()->sleep(duration);
   return simgrid::kernel::activity::State::DONE;
@@ -323,15 +323,16 @@ int simcall_sem_acquire_timeout(smx_sem_t sem, double timeout)
   return simcall_BODY_sem_acquire_timeout(sem, 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;
 }
 
 {
   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); });
 {
   simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
   simgrid::kernel::actor::simcall_blocking<void>([io, issuer, timeout] { io->wait_for(issuer, timeout); });