X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1282bea34802164b8173a518bcd379fd845bb684..5a4b0bd8b8fab79966acf4f63dfc55781d8c0e54:/examples/cxx/suspend/LazyGuy.cxx diff --git a/examples/cxx/suspend/LazyGuy.cxx b/examples/cxx/suspend/LazyGuy.cxx index 7db90b7ed4..c19db95719 100644 --- a/examples/cxx/suspend/LazyGuy.cxx +++ b/examples/cxx/suspend/LazyGuy.cxx @@ -1,24 +1,25 @@ -#include "LazyGuy.hpp" -#include - -#include - -MSG_IMPLEMENT_DYNAMIC(LazyGuy, Process); - -int LazyGuy::main(int argc, char** argv) -{ - info("Hello !"); - - info("Nobody's watching me ? Let's go to sleep."); - - Process::currentProcess().suspend(); - - info("Uuuh ? Did somebody call me ?"); - - info("Mmmh, goodbye now."); - - - delete this; - - return 0; -} \ No newline at end of file +#include "LazyGuy.hpp" +#include + +#include + +// Not needed : DreamMaster directly constructs the object +// MSG_IMPLEMENT_DYNAMIC(LazyGuy, Process) + +int LazyGuy::main(int argc, char** argv) +{ + info("Hello !"); + + info("Nobody's watching me ? Let's go to sleep."); + + Process::currentProcess().suspend(); + + info("Uuuh ? Did somebody call me ?"); + + info("Mmmh, goodbye now."); + + delete this; + + return 0; +} +