Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New function: MSG_get_process_number()
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 14 Nov 2012 21:19:30 +0000 (22:19 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 14 Nov 2012 21:23:45 +0000 (22:23 +0100)
ChangeLog
include/msg/msg.h
src/msg/msg_process.c

index 5d4efe5..4727304 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@ SimGrid (3.9) NOT RELEASED; urgency=low
  * Now works on Windows too!
  * Much more extensive test suite, from MPICH
 
  * Now works on Windows too!
  * Much more extensive test suite, from MPICH
 
+ MSG:
+ * New function: MSG_get_process_number()
+
  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
 SimGrid (3.8.1) stable; urgency=low
  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
 SimGrid (3.8.1) stable; urgency=low
index a0f6261..3d92365 100644 (file)
@@ -151,6 +151,8 @@ XBT_PUBLIC(int) MSG_process_self_PID(void);
 XBT_PUBLIC(int) MSG_process_self_PPID(void);
 XBT_PUBLIC(msg_process_t) MSG_process_self(void);
 XBT_PUBLIC(xbt_dynar_t) MSG_processes_as_dynar(void);
 XBT_PUBLIC(int) MSG_process_self_PPID(void);
 XBT_PUBLIC(msg_process_t) MSG_process_self(void);
 XBT_PUBLIC(xbt_dynar_t) MSG_processes_as_dynar(void);
+XBT_PUBLIC(int) MSG_process_get_number(void);
+
 XBT_PUBLIC(msg_error_t) MSG_process_set_kill_time(msg_process_t process, double kill_time);
 
 /*property handlers*/
 XBT_PUBLIC(msg_error_t) MSG_process_set_kill_time(msg_process_t process, double kill_time);
 
 /*property handlers*/
index 8c318c5..ddce625 100644 (file)
@@ -312,6 +312,12 @@ msg_process_t MSG_process_from_PID(int PID)
 xbt_dynar_t MSG_processes_as_dynar(void) {
   return SIMIX_processes_as_dynar();
 }
 xbt_dynar_t MSG_processes_as_dynar(void) {
   return SIMIX_processes_as_dynar();
 }
+/** @brief Return the current number MSG processes.
+ */
+int MSG_process_get_number(void)
+{
+  return SIMIX_process_count();
+}
 
 /** \ingroup m_process_management
  * \brief Set the kill time of a process.
 
 /** \ingroup m_process_management
  * \brief Set the kill time of a process.