Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
deprecate an old pimple
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 25 Mar 2018 14:05:17 +0000 (16:05 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 25 Mar 2018 14:05:17 +0000 (16:05 +0200)
include/simgrid/msg.h
src/bindings/java/jmsg_process.cpp
src/msg/msg_process.cpp

index 0a3339e..796e26b 100644 (file)
@@ -368,8 +368,10 @@ XBT_PUBLIC void MSG_barrier_destroy(msg_bar_t bar);
 XBT_PUBLIC int MSG_barrier_wait(msg_bar_t bar);
 
 /* ****************************************************************************************** */
 XBT_PUBLIC int MSG_barrier_wait(msg_bar_t bar);
 
 /* ****************************************************************************************** */
-/* Used only by the bindings -- unclean pimple, please ignore if you're not writing a binding */
-XBT_PUBLIC smx_context_t MSG_process_get_smx_ctx(msg_process_t process);
+/* DO NOT USE this nasty pimple (unless if you're writing a binding) */
+XBT_PUBLIC smx_context_t
+XBT_ATTRIB_DEPRECATED_v323("MSG_process_get_smx_ctx is deprecated. Please contact us if you need it.")
+MSG_process_get_smx_ctx(msg_process_t process);
 
 SG_END_DECL()
 
 
 SG_END_DECL()
 
index feb66c1..25b4733 100644 (file)
@@ -27,7 +27,7 @@ jfieldID jprocess_field_Process_ppid;
 
 jobject jprocess_from_native(msg_process_t process)
 {
 
 jobject jprocess_from_native(msg_process_t process)
 {
-  simgrid::kernel::context::JavaContext* context = (simgrid::kernel::context::JavaContext*) MSG_process_get_smx_ctx(process);
+  simgrid::kernel::context::JavaContext* context = (simgrid::kernel::context::JavaContext*) process->getImpl()->context;
   return context->jprocess;
 }
 
   return context->jprocess;
 }
 
index cf0886d..0217d64 100644 (file)
@@ -313,7 +313,7 @@ msg_process_t MSG_process_self()
   return SIMIX_process_self()->ciface();
 }
 
   return SIMIX_process_self()->ciface();
 }
 
-smx_context_t MSG_process_get_smx_ctx(msg_process_t process) {
+smx_context_t MSG_process_get_smx_ctx(msg_process_t process) { // deprecated -- smx_context_t should die afterward
   return process->getImpl()->context;
 }
 /**
   return process->getImpl()->context;
 }
 /**