X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/48eccb2c1532e35819830ca56fad7cf89887359f..d07e7725e5403b21d0cfab0a8fea8a1f30fcc8bf:/src/msg/msg_global.cpp diff --git a/src/msg/msg_global.cpp b/src/msg/msg_global.cpp index d882de4b27..f056efdf31 100644 --- a/src/msg/msg_global.cpp +++ b/src/msg/msg_global.cpp @@ -4,6 +4,8 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include + #include "simgrid/msg.h" #include "instr/instr_interface.h" #include "msg_private.h" @@ -16,7 +18,7 @@ XBT_LOG_NEW_CATEGORY(msg, "All MSG categories"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)"); -MSG_Global_t msg_global = NULL; +MSG_Global_t msg_global = nullptr; static void MSG_exit(void); /********************************* MSG **************************************/ @@ -51,8 +53,8 @@ void MSG_init_nocheck(int *argc, char **argv) { SIMIX_global_init(argc, argv); msg_global->sent_msg = 0; - msg_global->task_copy_callback = NULL; - msg_global->process_data_cleanup = NULL; + msg_global->task_copy_callback = nullptr; + msg_global->process_data_cleanup = nullptr; SIMIX_function_register_process_create(MSG_process_create_from_SIMIX); SIMIX_function_register_process_cleanup(MSG_process_cleanup_from_SIMIX); @@ -127,13 +129,13 @@ int MSG_process_killall(int reset_PIDs) } static void MSG_exit(void) { - if (msg_global==NULL) + if (msg_global==nullptr) return; TRACE_surf_resource_utilization_release(); TRACE_end(); free(msg_global); - msg_global = NULL; + msg_global = nullptr; } /** \ingroup msg_simulation