Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / mc / remote / mc_protocol.h
index e620fc6..83d2239 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2021. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
 
 #ifdef __cplusplus
 
-#include "cstdint"
 #include "mc/datatypes.h"
 #include "simgrid/forward.h" // aid_t
+#include <array>
+#include <cstdint>
 
 // ***** Messages
 namespace simgrid {
@@ -44,7 +45,7 @@ enum class MessageType {
 } // namespace mc
 } // namespace simgrid
 
-#define MC_MESSAGE_LENGTH 512
+constexpr unsigned MC_MESSAGE_LENGTH = 512;
 
 /** Basic structure for a MC message
  *
@@ -88,7 +89,7 @@ struct s_mc_message_stack_region_t {
 
 struct s_mc_message_register_symbol_t {
   simgrid::mc::MessageType type;
-  char name[128];
+  std::array<char, 128> name;
   int (*callback)(void*);
   void* data;
 };