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
another pre-release check to do
[simgrid.git]
/
doc
/
doxygen
/
inside_extending.doc
diff --git
a/doc/doxygen/inside_extending.doc
b/doc/doxygen/inside_extending.doc
index
0ea3940
..
9593489
100644
(file)
--- a/
doc/doxygen/inside_extending.doc
+++ b/
doc/doxygen/inside_extending.doc
@@
-160,13
+160,13
@@
the simcall definitions from src/simix/simcalls.in, checks that both
`simcall_<name>()` and `simcall_HANDLER()` are defined somewhere, and
generates the following files:
`simcall_<name>()` and `simcall_HANDLER()` are defined somewhere, and
generates the following files:
--
smx_popping_accessors.h
:
+-
popping_accessors.hpp
:
Helper functions to get and set simcall arguments and results
Helper functions to get and set simcall arguments and results
--
smx_
popping_bodies.cpp:
+- popping_bodies.cpp:
The BODY function of each simcall
The BODY function of each simcall
--
smx_popping_enum.c
:
+-
popping_enum.h
:
Definition of type `enum e_smx_simcall_t` (one value per existing simcall)
Definition of type `enum e_smx_simcall_t` (one value per existing simcall)
--
smx_
popping_generated.cpp:
+- popping_generated.cpp:
Definitions of `simcall_names[]` (debug name of each simcall), and
SIMIX_simcall_enter() that deals with the simcall from within the kernel
Definitions of `simcall_names[]` (debug name of each simcall), and
SIMIX_simcall_enter() that deals with the simcall from within the kernel
@@
-211,11
+211,12
@@
with the result:
try {
std::vector<char> result = simgrid::simix::kernelSync([&] {
// Fictional example, simgrid::kernel::readFile does not exist.
try {
std::vector<char> result = simgrid::simix::kernelSync([&] {
// Fictional example, simgrid::kernel::readFile does not exist.
- simgrid::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
+ simgrid::
kernel::
Future<std::vector<char>> result = simgrid::kernel::readFile(file);
return result;
});
XBT_DEBUG("Finished reading file %s: length %zu", file, result.size());
}
return result;
});
XBT_DEBUG("Finished reading file %s: length %zu", file, result.size());
}
+// If the operation failed, kernelSync() throws an exception:
catch (std::runtime_error& e) {
XBT_ERROR("Could not read file %s", file);
}
catch (std::runtime_error& e) {
XBT_ERROR("Could not read file %s", file);
}
@@
-228,7
+229,7
@@
like `kernelSync()` but does not block. Instead, it returns a
~~~
simgrid::simix::Future<std:vector<char>> result = simgrid::simix::kernelSync([&] {
// Fictional example, simgrid::kernel::readFile does not exist.
~~~
simgrid::simix::Future<std:vector<char>> result = simgrid::simix::kernelSync([&] {
// Fictional example, simgrid::kernel::readFile does not exist.
- simgrid::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
+ simgrid::
kernek::
Future<std::vector<char>> result = simgrid::kernel::readFile(file);
return result;
};
return result;
};
@@
-239,9
+240,10
@@
while (!result.is_ready() && hasWorkToDo())
// We don't have anything to do, wait for the operation to complete and
// get its value:
try {
// We don't have anything to do, wait for the operation to complete and
// get its value:
try {
- std:vector<char>
value
= result.get();
- XBT_DEBUG("Finished reading file %s: length %zu", file,
result
.size());
+ std:vector<char>
data
= result.get();
+ XBT_DEBUG("Finished reading file %s: length %zu", file,
data
.size());
}
}
+// If the operation failed, .get() throws an exception:
catch (std::runtime_error& e) {
XBT_ERROR("Could not read file %s", file);
}
catch (std::runtime_error& e) {
XBT_ERROR("Could not read file %s", file);
}