]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/actor/CommObserver.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix an initialization race around the AppSide
[simgrid.git] / src / kernel / actor / CommObserver.cpp
index 1ea0494a582e1c30f4a89a750cd1d4c2978244d1..84c317e1c450fdf9e679291f368ac8faeb104e4e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2019-2023. 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. */
@@ -197,6 +197,7 @@ void ActivityWaitanySimcall::prepare(int times_considered)
 
 void CommIsendSimcall::serialize(std::stringstream& stream) const
 {
+  /* Note that the comm_ is 0 until after the execution of the simcall */
   stream << (short)mc::Transition::Type::COMM_ASYNC_SEND << ' ';
   stream << (uintptr_t)comm_ << ' ' << mbox_->get_id() << ' ' << (uintptr_t)src_buff_ << ' ' << src_buff_size_ << ' '
          << tag_;
@@ -212,6 +213,7 @@ std::string CommIsendSimcall::to_string() const
 
 void CommIrecvSimcall::serialize(std::stringstream& stream) const
 {
+  /* Note that the comm_ is 0 until after the execution of the simcall */
   stream << (short)mc::Transition::Type::COMM_ASYNC_RECV << ' ';
   stream << (uintptr_t)comm_ << ' ' << mbox_->get_id() << ' ' << (uintptr_t)dst_buff_ << ' ' << tag_;
   XBT_DEBUG("RecvObserver comm:%p mbox:%u buff:%p tag:%d", comm_, mbox_->get_id(), dst_buff_, tag_);