Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove simix.h from one more C file
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Jul 2017 21:32:43 +0000 (23:32 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Jul 2017 21:32:43 +0000 (23:32 +0200)
include/simgrid/msg.h
include/xbt/synchro.h
src/msg/msg_process.cpp
src/xbt/xbt_os_synchro.c
src/xbt/xbt_virtu.c

index 6eb90dd..057b20c 100644 (file)
@@ -297,6 +297,7 @@ XBT_PUBLIC(int) MSG_process_get_PPID(msg_process_t process);
 XBT_PUBLIC(const char *) MSG_process_get_name(msg_process_t process);
 XBT_PUBLIC(int) MSG_process_self_PID();
 XBT_PUBLIC(int) MSG_process_self_PPID();
+XBT_PUBLIC(const char*) MSG_process_self_name();
 XBT_PUBLIC(msg_process_t) MSG_process_self();
 XBT_PUBLIC(xbt_dynar_t) MSG_processes_as_dynar();
 XBT_PUBLIC(int) MSG_process_get_number();
index 340ef71..ba772f7 100644 (file)
@@ -8,8 +8,6 @@
 #ifndef XBT_THREAD_H
 #define XBT_THREAD_H
 
-#include <simgrid/simix.h>
-
 #include "xbt/function_types.h"
 #include "xbt/misc.h" /* SG_BEGIN_DECL */
 
index 091650e..ffe758f 100644 (file)
@@ -390,6 +390,14 @@ int MSG_process_self_PPID()
   return MSG_process_get_PPID(MSG_process_self());
 }
 
+/** \ingroup m_process_management
+ * \brief Return the name of the current process.
+ */
+const char* MSG_process_self_name()
+{
+  return SIMIX_process_self_get_name();
+}
+
 /** \ingroup m_process_management
  * \brief Return the current process.
  *
index 8727228..1a7adda 100644 (file)
@@ -1,7 +1,4 @@
-/* xbt_synchro -- Synchronization virtualized depending on whether we are   */
-/*                in simulation or real life (act on simulated processes)   */
-
-/* This is the simulation implementation, using simix.                      */
+/* Classical synchro schema, implemented on top of SimGrid                  */
 
 /* Copyright (c) 2007-2016. The SimGrid Team.
  * All rights reserved.                                                     */
index b35f23a..b4d2cb5 100644 (file)
@@ -5,10 +5,10 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "simgrid/msg.h"
+#include "xbt/function_types.h"
 #include "xbt/misc.h"
 #include "xbt/virtu.h"
-#include "xbt/function_types.h"
-#include "simgrid/simix.h"
 
 static int xbt_fake_pid(void)
 {
@@ -19,5 +19,5 @@ int_f_void_t xbt_getpid = &xbt_fake_pid;
 
 const char *xbt_procname(void)
 {
-  return SIMIX_process_self_get_name();
+  return MSG_process_self_name();
 }