Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate functions MSG_global_init() / MSG_global_init_args() in flavor of MSG_init()
[simgrid.git] / examples / msg / properties / msg_prop.c
index 051ba16..1889aa6 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
+/** @addtogroup MSG_examples
+ * 
+ * - <b>properties/msg_prop.c</b> Attaching arbitrary informations to
+ *   host, processes and such, and retrieving them with @ref
+ *   MSG_host_get_properties, @ref MSG_host_get_property_value, @ref
+ *   MSG_process_get_properties and @ref
+ *   MSG_process_get_property_value. Also make sure to read the
+ *   platform and deployment XML files to see how to declare these
+ *   data.
+ * 
+ */
+
 XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Property test");
 
 int alice(int argc, char *argv[]);
@@ -62,7 +74,7 @@ static void test_host(const char*hostname)
   XBT_INFO("   Property: %s old value: %s", exist, value);
    
   /* Restore the value for the next test */
-  xbt_dict_set(props, exist, xbt_strdup("180"), xbt_free_f);
+  xbt_dict_set(props, exist, xbt_strdup("180"), NULL);
 }
 
 int alice(int argc, char *argv[]) { /* Dump what we have on the current host */
@@ -116,7 +128,7 @@ int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 
-  MSG_global_init(&argc, argv);
+  MSG_init(&argc, argv);
   if (argc < 3) {
     printf("Usage: %s platform_file deployment_file\n", argv[0]);
     printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);