Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fbbafb0a1d6b9604167514403ddb7aa256ec2393
[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 "xbt/sysdep.h"
9 #include "xbt/log.h"
10
11 /** \brief set a configuration variable
12  *
13  * Do --help on any simgrid binary to see the list of currently existing configuration variables
14  *
15  * Example:
16  * MSG_config("workstation/model","KCCFLN05");
17  */
18 void MSG_config(const char *name, ...)
19 {
20   va_list pa;
21
22   if (!msg_global) {
23     fprintf(stderr,
24             "ERROR: Please call MSG_init() before using MSG_config()\n");
25     xbt_abort();
26   }
27   va_start(pa, name);
28   xbt_cfg_set_vargs(_surf_cfg_set, name, pa);
29   va_end(pa);
30   return;
31 }