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
Change an example to take its platform file from the command line if provided
[simgrid.git]
/
examples
/
cpp
/
synchro-mutex
/
s4u-synchro-mutex.cpp
diff --git
a/examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
b/examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
index
bab6731
..
2413226
100644
(file)
--- a/
examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
+++ b/
examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
@@
-47,7
+47,7
@@
static void workerScopedLock(sg4::MutexPtr mutex, int& result)
int main(int argc, char** argv)
{
sg4::Engine e(&argc, argv);
int main(int argc, char** argv)
{
sg4::Engine e(&argc, argv);
- e.load_platform("../../platforms/two_hosts.xml");
+ e.load_platform(
argc > 1 ? argv[1] :
"../../platforms/two_hosts.xml");
/* Create the requested amount of actors pairs. Each pair has a specific mutex and cell in `result`. */
std::vector<int> result(cfg_actor_count.get());
/* Create the requested amount of actors pairs. Each pair has a specific mutex and cell in `result`. */
std::vector<int> result(cfg_actor_count.get());