Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Moving functions to the right location and making them work.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Mar 2005 06:06:28 +0000 (06:06 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Mar 2005 06:06:28 +0000 (06:06 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1122 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Virtu/rl_process.c
src/gras/Virtu/sg_process.c
src/msg/m_process.c

index 716c807..f602d7a 100644 (file)
@@ -29,7 +29,8 @@ xbt_error_t gras_process_exit() {
 }
 
 const char *xbt_procname(void) {
 }
 
 const char *xbt_procname(void) {
-   return _gras_procname;
+  if(_gras_procname) return _gras_procname;
+  else return "(null)";
 }
 
 /* **************************************************************************
 }
 
 /* **************************************************************************
index 838a74c..0c51c0e 100644 (file)
@@ -124,3 +124,13 @@ gras_procdata_t *gras_procdata_get(void) {
   return pd;
 }
 
   return pd;
 }
 
+const char* xbt_procname(void) {
+  const char *res = NULL;
+  m_process_t process = MSG_process_self();
+  if ((process != NULL) && (process->simdata))
+    res = MSG_process_get_name(process);
+  if (res) 
+    return res;
+  else
+    return "";
+}
index 63a43d1..36ed639 100644 (file)
@@ -482,15 +482,3 @@ int __MSG_process_isBlocked(m_process_t process)
 
   return (process->simdata->blocked);
 }
 
   return (process->simdata->blocked);
 }
-
-
-const char* xbt_procname(void) {
-  char *res = NULL;
-  m_process_t process = MSG_process_self();
-  if ((process != NULL) && (process->simdata))
-    res = (char *)MSG_process_get_name(process);
-  if (res) 
-    return (const char*)res;
-  else
-    return "";
-}