Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / include / simgrid / plugins / ProducerConsumer.hpp
index 02c54da..66381ca 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2021-2022. 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. */
@@ -6,10 +6,10 @@
 #ifndef SIMGRID_PLUGIN_PRODUCERCONSUMER_HPP
 #define SIMGRID_PLUGIN_PRODUCERCONSUMER_HPP
 
+#include <simgrid/s4u/Comm.hpp>
 #include <simgrid/s4u/ConditionVariable.hpp>
 #include <simgrid/s4u/Mailbox.hpp>
 #include <simgrid/s4u/Mutex.hpp>
-#include <simgrid/simix.h>
 #include <xbt/asserts.h>
 #include <xbt/log.h>
 
@@ -147,7 +147,7 @@ public:
       can_put_->wait(lock);
     if (tmode_ == TransferMode::MAILBOX) {
       comm = mbox_->put_init(data, simulated_size_in_bytes)
-                 ->set_copy_data_callback(SIMIX_comm_copy_pointer_callback)
+                 ->set_copy_data_callback(s4u::Comm::copy_pointer_callback)
                  ->start();
     } else
       queue_.push(data);
@@ -185,7 +185,7 @@ public:
     if (tmode_ == TransferMode::MAILBOX)
       comm = mbox_->get_init()
                  ->set_dst_data(reinterpret_cast<void**>(data), sizeof(void*))
-                 ->set_copy_data_callback(SIMIX_comm_copy_pointer_callback)
+                 ->set_copy_data_callback(s4u::Comm::copy_pointer_callback)
                  ->start();
     else {
       *data = queue_.front();