From: Arnaud Giersch Date: Fri, 26 Mar 2021 13:55:46 +0000 (+0100) Subject: Move PoC blocking_simcall.hpp from public include/ to teshsuite/. X-Git-Tag: v3.27~30^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9ff25e521350bc747f963bfe70bf3f84930c1a07 Move PoC blocking_simcall.hpp from public include/ to teshsuite/. --- diff --git a/MANIFEST.in b/MANIFEST.in index 75b9be4ed6..231c235f08 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -651,6 +651,7 @@ include teshsuite/kernel/context-defaults/factory_boost.tesh include teshsuite/kernel/context-defaults/factory_raw.tesh include teshsuite/kernel/context-defaults/factory_thread.tesh include teshsuite/kernel/context-defaults/factory_ucontext.tesh +include teshsuite/kernel/simcall-generic/blocking_simcall.hpp include teshsuite/kernel/simcall-generic/simcall-generic.cpp include teshsuite/kernel/simcall-generic/simcall-generic.tesh include teshsuite/kernel/stack-overflow/stack-overflow.cpp @@ -2005,7 +2006,6 @@ include include/simgrid/semaphore.h include include/simgrid/simdag.h include include/simgrid/simix.h include include/simgrid/simix.hpp -include include/simgrid/simix/blocking_simcall.hpp include include/simgrid/smpi/smpi_replay.hpp include include/simgrid/version.h.in include include/simgrid/vm.h diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index 03e785c038..3e9f2cd959 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -98,6 +98,8 @@ auto simcall_blocking(F&& code, Observer* observer) -> decltype(observer->get_re namespace simgrid { namespace simix { +XBT_PUBLIC void unblock(smx_actor_t process); + inline auto& simix_timers() // avoid static initialization order fiasco { using TimerQelt = std::pair; diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 3ea6d4fc7a..41bb5b9b6c 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -11,7 +11,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "mc/mc.h" -#include "simgrid/simix/blocking_simcall.hpp" #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/activity/ConditionVariableImpl.hpp" #include "src/kernel/activity/ExecImpl.hpp" diff --git a/teshsuite/kernel/CMakeLists.txt b/teshsuite/kernel/CMakeLists.txt index b4b7554ba2..2ecaaadf43 100644 --- a/teshsuite/kernel/CMakeLists.txt +++ b/teshsuite/kernel/CMakeLists.txt @@ -47,6 +47,6 @@ endforeach() # Pack the files in the archive -set(teshsuite_src ${teshsuite_src} PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/simcall-generic/blocking_simcall.hpp PARENT_SCOPE) set(tesh_files ${tesh_files} PARENT_SCOPE) set(xml_files ${xml_files} PARENT_SCOPE) diff --git a/include/simgrid/simix/blocking_simcall.hpp b/teshsuite/kernel/simcall-generic/blocking_simcall.hpp similarity index 98% rename from include/simgrid/simix/blocking_simcall.hpp rename to teshsuite/kernel/simcall-generic/blocking_simcall.hpp index 7a80fe5d05..3538e710f2 100644 --- a/include/simgrid/simix/blocking_simcall.hpp +++ b/teshsuite/kernel/simcall-generic/blocking_simcall.hpp @@ -21,8 +21,6 @@ namespace simgrid { namespace simix { -XBT_PUBLIC void unblock(smx_actor_t process); - /** Execute some code in kernel mode and wakes up the actor when * the result is available. * @@ -74,8 +72,7 @@ template auto kernel_sync(F code) -> decltype(code().get()) // - SharedFuture // - simgrid::simix::when_all - wait for all future to be ready (this one is simple!) // - simgrid::simix::when_any - wait for any future to be ready -template -class Future { +template class Future { public: Future() = default; explicit Future(simgrid::kernel::Future future) : future_(std::move(future)) {} diff --git a/teshsuite/kernel/simcall-generic/simcall-generic.cpp b/teshsuite/kernel/simcall-generic/simcall-generic.cpp index 3e9adcf67c..db7ecb6fd8 100644 --- a/teshsuite/kernel/simcall-generic/simcall-generic.cpp +++ b/teshsuite/kernel/simcall-generic/simcall-generic.cpp @@ -12,9 +12,10 @@ #include #include #include -#include #include +#include "blocking_simcall.hpp" + XBT_LOG_NEW_DEFAULT_CATEGORY(test, "my log messages"); namespace example { diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index a907aa8caa..560ef21572 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -685,7 +685,6 @@ set(headers_to_install include/simgrid/forward.h include/simgrid/simix.h include/simgrid/simix.hpp - include/simgrid/simix/blocking_simcall.hpp include/simgrid/kernel/future.hpp include/simgrid/disk.h include/simgrid/host.h