From 4c7ee8190b86e9eb2adb13479325f586ead44ed0 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Thu, 30 Nov 2017 09:45:20 +0100 Subject: [PATCH] (hopefully) finalize pluginifaction of pseudo file system --- examples/msg/io-remote/io-remote.c | 2 +- examples/s4u/actions-storage/s4u-actions-storage.cpp | 2 ++ examples/s4u/io/s4u-io.cpp | 1 + include/simgrid/s4u.hpp | 1 - src/msg/msg_io.cpp | 2 +- .../s4u/File.hpp => src/plugins/file_system/FileSystem.hpp | 0 .../file_system/s4u_FileSystem.cpp} | 4 ++-- src/s4u/s4u_storage.cpp | 2 +- .../s4u/storage_client_server/storage_client_server.cpp | 1 + tools/cmake/DefinePackages.cmake | 7 ++++--- 10 files changed, 13 insertions(+), 9 deletions(-) rename include/simgrid/s4u/File.hpp => src/plugins/file_system/FileSystem.hpp (100%) rename src/{s4u/s4u_file.cpp => plugins/file_system/s4u_FileSystem.cpp} (98%) diff --git a/examples/msg/io-remote/io-remote.c b/examples/msg/io-remote/io-remote.c index 010afdb4f6..626bd393c0 100644 --- a/examples/msg/io-remote/io-remote.c +++ b/examples/msg/io-remote/io-remote.c @@ -4,7 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/msg.h" -#include "simgrid/plugins/file_system.h" +#include #define INMEGA (1024*1024) diff --git a/examples/s4u/actions-storage/s4u-actions-storage.cpp b/examples/s4u/actions-storage/s4u-actions-storage.cpp index 39d8bd5d3d..fde216ebe7 100644 --- a/examples/s4u/actions-storage/s4u-actions-storage.cpp +++ b/examples/s4u/actions-storage/s4u-actions-storage.cpp @@ -4,7 +4,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/s4u.hpp" +#include "src/plugins/file_system/FileSystem.hpp" #include +#include #include #include diff --git a/examples/s4u/io/s4u-io.cpp b/examples/s4u/io/s4u-io.cpp index ab43a7a735..dc3e5e3cad 100644 --- a/examples/s4u/io/s4u-io.cpp +++ b/examples/s4u/io/s4u-io.cpp @@ -7,6 +7,7 @@ #include #include "simgrid/s4u.hpp" +#include "src/plugins/file_system/FileSystem.hpp" XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "a sample log category"); diff --git a/include/simgrid/s4u.hpp b/include/simgrid/s4u.hpp index ee32b446d5..e1dfeda7e0 100644 --- a/include/simgrid/s4u.hpp +++ b/include/simgrid/s4u.hpp @@ -18,7 +18,6 @@ #include #include -#include #include #endif /* SIMGRID_S4U_S4U_H */ diff --git a/src/msg/msg_io.cpp b/src/msg/msg_io.cpp index ce8c940790..70224e8a6b 100644 --- a/src/msg/msg_io.cpp +++ b/src/msg/msg_io.cpp @@ -3,10 +3,10 @@ /* 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 "simgrid/s4u/File.hpp" #include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Storage.hpp" #include "src/msg/msg_private.hpp" +#include "src/plugins/file_system/FileSystem.hpp" #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_io, msg, "Logging specific to MSG (io)"); diff --git a/include/simgrid/s4u/File.hpp b/src/plugins/file_system/FileSystem.hpp similarity index 100% rename from include/simgrid/s4u/File.hpp rename to src/plugins/file_system/FileSystem.hpp diff --git a/src/s4u/s4u_file.cpp b/src/plugins/file_system/s4u_FileSystem.cpp similarity index 98% rename from src/s4u/s4u_file.cpp rename to src/plugins/file_system/s4u_FileSystem.cpp index f66b6812d7..d48c7d3afc 100644 --- a/src/s4u/s4u_file.cpp +++ b/src/plugins/file_system/s4u_FileSystem.cpp @@ -5,10 +5,10 @@ #include "xbt/log.h" -#include "simgrid/s4u/File.hpp" #include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Storage.hpp" #include "simgrid/simix.hpp" +#include "src/plugins/file_system/FileSystem.hpp" #include "src/surf/HostImpl.hpp" #include @@ -17,7 +17,7 @@ #include #include -XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_file,"S4U files"); +XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_file, "S4U files"); namespace simgrid { namespace s4u { diff --git a/src/s4u/s4u_storage.cpp b/src/s4u/s4u_storage.cpp index 4d06ae3120..b4920f5a15 100644 --- a/src/s4u/s4u_storage.cpp +++ b/src/s4u/s4u_storage.cpp @@ -3,10 +3,10 @@ /* 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 "simgrid/s4u/File.hpp" #include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Storage.hpp" #include "simgrid/simix.hpp" +#include "src/plugins/file_system/FileSystem.hpp" #include "src/surf/StorageImpl.hpp" #include diff --git a/teshsuite/s4u/storage_client_server/storage_client_server.cpp b/teshsuite/s4u/storage_client_server/storage_client_server.cpp index 1158fde147..9eb3c0323c 100644 --- a/teshsuite/s4u/storage_client_server/storage_client_server.cpp +++ b/teshsuite/s4u/storage_client_server/storage_client_server.cpp @@ -4,6 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/s4u.hpp" +#include "src/plugins/file_system/FileSystem.hpp" #include #include diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 47570c31c4..a9e3259fcb 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -362,6 +362,9 @@ set(SURF_SRC ) set(PLUGINS_SRC + src/plugins/file_system/FileSystem.hpp + src/plugins/file_system/s4u_FileSystem.cpp + src/plugins/vm/VirtualMachineImpl.hpp src/plugins/vm/s4u_VirtualMachine.cpp src/plugins/vm/VirtualMachineImpl.hpp src/plugins/vm/VirtualMachineImpl.cpp @@ -425,8 +428,7 @@ set(S4U_SRC src/s4u/s4u_conditionVariable.cpp src/s4u/s4u_comm.cpp src/s4u/s4u_engine.cpp - src/s4u/s4u_file.cpp - src/s4u/s4u_host.cpp + src/s4u/s4u_host.cpp src/s4u/s4u_link.cpp src/s4u/s4u_mailbox.cpp src/s4u/s4u_mutex.cpp @@ -684,7 +686,6 @@ set(headers_to_install include/simgrid/s4u/Comm.hpp include/simgrid/s4u/ConditionVariable.hpp include/simgrid/s4u/Engine.hpp - include/simgrid/s4u/File.hpp include/simgrid/s4u/Host.hpp include/simgrid/s4u/Link.hpp include/simgrid/s4u/Mailbox.hpp -- 2.20.1