A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[simix] Add comments about the generic simcalls and rename them
[simgrid.git]
/
teshsuite
/
simix
/
generic_simcalls
/
generic_simcalls.cpp
diff --git
a/teshsuite/simix/generic_simcalls/generic_simcalls.cpp
b/teshsuite/simix/generic_simcalls/generic_simcalls.cpp
index 316065724d1705684b19423c1a8d9cff273797aa..b2525f5adf46d294e097569d395983b217b00b44 100644
(file)
--- a/
teshsuite/simix/generic_simcalls/generic_simcalls.cpp
+++ b/
teshsuite/simix/generic_simcalls/generic_simcalls.cpp
@@
-40,22
+40,22
@@
static int master(int argc, char *argv[])
{
// Test the simple immediate execution:
XBT_INFO("Start");
- simgrid::simix::kernel([] {
+ simgrid::simix::kernel
Immediate
([] {
XBT_INFO("kernel");
});
XBT_INFO("kernel, returned");
// Synchronize on a successful Future<void>:
- simgrid::simix::
blocking_simcall
([&] {
+ simgrid::simix::
kernelSync
([&] {
return kernel_defer(10, [] {
- XBT_INFO("
blocking_simcall
with void");
+ XBT_INFO("
kernelSync
with void");
});
});
- XBT_INFO("
blocking_simcall
with void, returned");
+ XBT_INFO("
kernelSync
with void, returned");
// Synchronize on a failing Future<void>:
try {
- simgrid::simix::
blocking_simcall
([&] {
+ simgrid::simix::
kernelSync
([&] {
return kernel_defer(20, [] {
throw std::runtime_error("Exception throwed from kernel_defer");
});
@@
-67,23
+67,23
@@
static int master(int argc, char *argv[])
}
// Synchronize on a successul Future<int> and get the value:
- int res = simgrid::simix::
blocking_simcall
([&] {
+ int res = simgrid::simix::
kernelSync
([&] {
return kernel_defer(30, [] {
- XBT_INFO("
blocking_simcall
with value");
+ XBT_INFO("
kernelSync
with value");
return 42;
});
});
- XBT_INFO("
blocking_simcall
with value returned with %i", res);
+ XBT_INFO("
kernelSync
with value returned with %i", res);
// Synchronize on a successul Future<int> and get the value:
- simgrid::simix::Future<int> future = simgrid::simix::
asynchronous_simcall
([&] {
+ simgrid::simix::Future<int> future = simgrid::simix::
kernelAsync
([&] {
return kernel_defer(50, [] {
- XBT_INFO("
asynchronous_simcall
with value");
+ XBT_INFO("
kernelAsync
with value");
return 43;
});
});
res = future.get();
- XBT_INFO("
asynchronous_simcall
with value returned with %i", res);
+ XBT_INFO("
kernelAsync
with value returned with %i", res);
return 0;
}