Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move module tracing into corresponding modules
[simgrid.git] / src / msg / msg_config.c
1 /* Copyright (c) 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "msg_private.h"
8 #include "simgrid/sg_config.h"
9 #include "xbt/sysdep.h"
10 #include "xbt/log.h"
11
12 /** \brief set a configuration variable
13  *
14  * Do --help on any simgrid binary to see the list of currently existing configuration variables
15  *
16  * Example:
17  * MSG_config("workstation/model","KCCFLN05");
18  */
19 void MSG_config(const char *name, ...)
20 {
21   va_list pa;
22
23   if (!msg_global) {
24     fprintf(stderr,
25             "ERROR: Please call MSG_init() before using MSG_config()\n");
26     xbt_abort();
27   }
28   va_start(pa, name);
29   xbt_cfg_set_vargs(_sg_cfg_set, name, pa);
30   va_end(pa);
31   return;
32 }