From: Martin Quinson Date: Sun, 2 Jul 2017 21:32:43 +0000 (+0200) Subject: remove simix.h from one more C file X-Git-Tag: v3_17~492 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e08a6f2972c1da043d8a7b2a4d2e45ecfa676c7e remove simix.h from one more C file --- diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index 6eb90dde8d..057b20cbca 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -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(); diff --git a/include/xbt/synchro.h b/include/xbt/synchro.h index 340ef71171..ba772f7167 100644 --- a/include/xbt/synchro.h +++ b/include/xbt/synchro.h @@ -8,8 +8,6 @@ #ifndef XBT_THREAD_H #define XBT_THREAD_H -#include - #include "xbt/function_types.h" #include "xbt/misc.h" /* SG_BEGIN_DECL */ diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp index 091650ec02..ffe758f351 100644 --- a/src/msg/msg_process.cpp +++ b/src/msg/msg_process.cpp @@ -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. * diff --git a/src/xbt/xbt_os_synchro.c b/src/xbt/xbt_os_synchro.c index 8727228800..1a7adda2fb 100644 --- a/src/xbt/xbt_os_synchro.c +++ b/src/xbt/xbt_os_synchro.c @@ -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. */ diff --git a/src/xbt/xbt_virtu.c b/src/xbt/xbt_virtu.c index b35f23a91e..b4d2cb5546 100644 --- a/src/xbt/xbt_virtu.c +++ b/src/xbt/xbt_virtu.c @@ -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(); }