Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simix] Add a `run_blocking` simcall and simix::kernelSync
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 31 May 2016 14:36:51 +0000 (16:36 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 17 Jun 2016 10:12:31 +0000 (12:12 +0200)
commit467a0c53018ee489de1dd7ae61a083d52048b8e8
tree4334c8a15d875382e59dcac8d7e1580da7dd9baf
parent3a0a299cb69d766f851f6a3f629c46c26d1bd9cf
[simix] Add a `run_blocking` simcall and simix::kernelSync

* run_blocking() is a generic blocking simcall. It is given a callback
  which is executed immediately in the SimGrid kernel. The callback is
  responsible for setting the suitable logic for waking up the process
  when needed.

* simix::kernelSync() is a higher level wrapper for this. It is given
  a callback which is executed in the kernel SimGrid and returns a
  simgrid::kernel::Future<T>. The kernel blocks the process until the
  Future is ready and either the value wrapped in the future to the
  process or raises the exception stored in the Future in the process.

* simgrid::simix::{Future,Promise} provide an abstration for
  asynchronous stuff happening in the SimGrid kernel. They are based
  on C++1z futures.
18 files changed:
.gitignore
include/simgrid/kernel/future.hpp [new file with mode: 0644]
include/simgrid/simix.hpp
include/simgrid/simix/blocking_simcall.hpp [new file with mode: 0644]
include/xbt/future.hpp
src/simix/libsmx.cpp
src/simix/popping.cpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/popping_private.h
src/simix/simcalls.in
src/simix/smx_global.cpp
teshsuite/simix/CMakeLists.txt
teshsuite/simix/generic_simcalls/generic_simcalls.cpp [new file with mode: 0644]
teshsuite/simix/generic_simcalls/generic_simcalls.tesh [new file with mode: 0644]
tools/cmake/DefinePackages.cmake