X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c505117d2d46a87d2a637e17f1027f2ca37c3f14..b01ad897fbf1aadba693f0d49045ea090bde42ab:/src/smpi/include/smpi_win.hpp diff --git a/src/smpi/include/smpi_win.hpp b/src/smpi/include/smpi_win.hpp index d29f96a907..c32499feea 100644 --- a/src/smpi/include/smpi_win.hpp +++ b/src/smpi/include/smpi_win.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. +/* Copyright (c) 2010-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -7,10 +7,10 @@ #ifndef SMPI_WIN_HPP_INCLUDED #define SMPI_WIN_HPP_INCLUDED +#include "simgrid/s4u/Barrier.hpp" #include "smpi_f2c.hpp" #include "smpi_keyvals.hpp" #include "xbt/synchro.h" -#include #include #include @@ -19,7 +19,6 @@ namespace simgrid{ namespace smpi{ class Win : public F2C, public Keyval { - private : void* base_; MPI_Aint size_; int disp_unit_; @@ -27,15 +26,15 @@ class Win : public F2C, public Keyval { MPI_Info info_; MPI_Comm comm_; std::vector *requests_; - xbt_mutex_t mut_; - msg_bar_t bar_; + s4u::MutexPtr mut_; + s4u::Barrier* bar_; MPI_Win* connected_wins_; char* name_; int opened_; MPI_Group group_; int count_; //for ordering the accs - xbt_mutex_t lock_mut_; - xbt_mutex_t atomic_mut_; + s4u::MutexPtr lock_mut_; + s4u::MutexPtr atomic_mut_; std::list lockers_; int rank_; // to identify owner for barriers in MPI_COMM_WORLD int mode_; // exclusive or shared lock @@ -48,6 +47,8 @@ public: Win(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, int allocated = 0, int dynamic = 0); Win(MPI_Info info, MPI_Comm comm) : Win(MPI_BOTTOM, 0, 1, info, comm, 0, 1) {}; + Win(const Win&) = delete; + Win& operator=(const Win&) = delete; ~Win(); int attach (void *base, MPI_Aint size); int detach (void *base);