summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c7b2c29)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2411
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(module,xbt, "module handling");
char *xbt_binary_name=NULL; /* Mandatory to retrieve neat backtraces */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(module,xbt, "module handling");
char *xbt_binary_name=NULL; /* Mandatory to retrieve neat backtraces */
struct xbt_module_ {
xbt_dynar_t *deps;
struct xbt_module_ {
xbt_dynar_t *deps;
/** @brief Initialize the xbt mechanisms. */
void
xbt_init(int *argc, char **argv) {
/** @brief Initialize the xbt mechanisms. */
void
xbt_init(int *argc, char **argv) {
- static short int first_run = 1;
- if (!first_run)
+ xbt_initialized++;
+
+ if (xbt_initialized!=1)
return;
xbt_binary_name = strdup(argv[0]);
return;
xbt_binary_name = strdup(argv[0]);
VERB0("Initialize XBT");
xbt_log_init(argc,argv);
VERB0("Initialize XBT");
xbt_log_init(argc,argv);
/** @brief Finalize the xbt mechanisms. */
void
xbt_exit(){
/** @brief Finalize the xbt mechanisms. */
void
xbt_exit(){
+ xbt_initialized--;
+ if (xbt_initialized == 0)
+ free(xbt_binary_name);