Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a SIMIX_process_count() that SMPI needs
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Jun 2009 08:47:43 +0000 (08:47 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Jun 2009 08:47:43 +0000 (08:47 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6349 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/include/simix/simix.h
src/simix/smx_process.c

index e0bff3a..86e257f 100644 (file)
@@ -121,6 +121,7 @@ XBT_PUBLIC(int) SIMIX_process_is_suspended(smx_process_t process);
 
 /*property handlers*/
 XBT_PUBLIC(xbt_dict_t) SIMIX_process_get_properties(smx_process_t host);
+XBT_PUBLIC(int) SIMIX_process_count(void);
 
 /************************** Synchro handling **********************************/
 
index d715eab..9326ac2 100644 (file)
@@ -438,3 +438,13 @@ int SIMIX_process_is_suspended(smx_process_t process)
 
   return (process->simdata->suspended);
 }
+
+/**
+ * \brief Returns the amount of SIMIX processes in the system
+ *
+ * Maestro internal process is not counted, only user code processes are
+ */
+int SIMIX_process_count() {
+       return xbt_swag_size(simix_global->process_list);
+}
+