#include <xbt/misc.h> /* XBT_PUBLIC */
-XBT_PUBLIC(char *)xbt_binary_name;
-
XBT_PUBLIC(void) xbt_init(int *argc, char **argv);
XBT_PUBLIC(void) xbt_exit(void);
#endif /* _XBT_MODULE_H */
XBT_PUBLIC(double) xbt_time(void);
/* Get the name of the UNIX process englobing the world */
- XBT_PUBLIC(const char*) xbt_os_procname(void);
+ XBT_PUBLIC_DATA(char*) xbt_binary_name;
/**
*
xbt_dynar_t sg_cmdline = NULL;
-extern char *xbt_os_procname_data;
-
-
void surf_init(int *argc, char **argv)
{
- xbt_os_procname_data = argv[0];
-
XBT_DEBUG("Create all Libs");
host_lib = xbt_lib_new();
link_lib = xbt_lib_new();
e->bt_strings = NULL;
- if (!xbt_binary_name) /* no binary name, nothing to do */
+ if (xbt_binary_name != NULL) /* no binary name, nothing to do */
return;
if (e->used <= 1)
#include "portable.h" /* execinfo when available */
#include "xbt/ex.h"
#include "xbt/str.h"
-#include "xbt/module.h" /* xbt_binary_name */
#include "xbt_modinter.h" /* backtrace initialization headers */
#include "xbt/ex_interface.h"
"** SimGrid: UNCAUGHT EXCEPTION received on %s(%d): category: %s; value: %d\n"
"** %s\n"
"** Thrown by %s()%s\n",
- xbt_os_procname(), xbt_getpid(),
+ xbt_binary_name, xbt_getpid(),
xbt_ex_catname(e->category), e->value, e->msg,
e->procname, thrower ? thrower : " in this process");
XBT_CRITICAL("%s", e->msg);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mm_diff, xbt,
"Logging specific to mm_diff in mmalloc");
-extern char *xbt_binary_name;
-
xbt_dynar_t mc_heap_comparison_ignore;
xbt_dynar_t stacks_areas;
XBT_LOG_NEW_CATEGORY(smpi, "All SMPI categories"); /* lives here even if that's a bit odd to solve linking issues: this is used in xbt_log_file_appender to detect whether SMPI is used (and thus whether we should unbench the writing to disk) */
-char *xbt_binary_name = NULL; /* Mandatory to retrieve neat backtraces */
+char *xbt_binary_name = NULL; /* Name of the system process containing us (mandatory to retrieve neat backtraces) */
int xbt_initialized = 0;
int _surf_do_model_check = 0;
#include "xbt/function_types.h"
#include "simgrid/simix.h"
-char *xbt_os_procname_data = NULL;
-
static int xbt_fake_pid(void)
{
return 0;
{
return SIMIX_process_self_get_name();
}
-
-const char *xbt_os_procname(void)
-{
- return xbt_os_procname_data;
-}