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
satisfy travis by removing some useless lines
[simgrid.git]
/
examples
/
s4u
/
actor-yield
/
s4u-actor-yield.cpp
diff --git
a/examples/s4u/actor-yield/s4u-actor-yield.cpp
b/examples/s4u/actor-yield/s4u-actor-yield.cpp
index
6e79dc6
..
7eea17a
100644
(file)
--- a/
examples/s4u/actor-yield/s4u-actor-yield.cpp
+++ b/
examples/s4u/actor-yield/s4u-actor-yield.cpp
@@
-4,15
+4,12
@@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u.hpp"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u.hpp"
-#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_private.h"
-#include <string>
-/* This example does not much: It just spans over-polite
processes
that yield a large amount
+/* This example does not much: It just spans over-polite
actor
that yield a large amount
* of time before ending.
*
* of time before ending.
*
-* This serves as an example for the s4u-actor-yield() function, with which a
process
can request
-* to be rescheduled after the other
processes
that are ready at the current timestamp.
+* This serves as an example for the s4u-actor-yield() function, with which a
n actor
can request
+* to be rescheduled after the other
actor
that are ready at the current timestamp.
*
* It can also be used to benchmark our context-switching mechanism.
*/
*
* It can also be used to benchmark our context-switching mechanism.
*/
@@
-28,9
+25,8
@@
public:
}
void operator()()
{
}
void operator()()
{
- simgrid::s4u::ActorPtr actor;
for (int i = 0; i < number_of_yields; i++)
for (int i = 0; i < number_of_yields; i++)
-
actor->
yield();
+
simgrid::s4u::this_actor::
yield();
XBT_INFO("I yielded %ld times. Goodbye now!", number_of_yields);
}
};
XBT_INFO("I yielded %ld times. Goodbye now!", number_of_yields);
}
};
@@
-40,7
+36,7
@@
int main(int argc, char* argv[])
simgrid::s4u::Engine e(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
simgrid::s4u::Engine e(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
- "\tExample: %s
msg_platform.xml msg_
deployment.xml\n",
+ "\tExample: %s
platform.xml
deployment.xml\n",
argv[0], argv[0]);
e.loadPlatform(argv[1]); /* - Load the platform description */
argv[0], argv[0]);
e.loadPlatform(argv[1]); /* - Load the platform description */