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();
#ifndef XBT_THREAD_H
#define XBT_THREAD_H
-#include <simgrid/simix.h>
-
#include "xbt/function_types.h"
#include "xbt/misc.h" /* SG_BEGIN_DECL */
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.
*
-/* 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. */
/* 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)
{
const char *xbt_procname(void)
{
- return SIMIX_process_self_get_name();
+ return MSG_process_self_name();
}