X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4ae2fd01d8cc55bf83654e29f294335e3cb1f022..f540320e2e4fd4fe5c9cb1bf8a4b1c0a972082e6:/src/synchro/SynchroSleep.hpp diff --git a/src/synchro/SynchroSleep.hpp b/src/synchro/SynchroSleep.hpp new file mode 100644 index 0000000000..749195cd74 --- /dev/null +++ b/src/synchro/SynchroSleep.hpp @@ -0,0 +1,27 @@ +/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#ifndef _SIMIX_SYNCHRO_SLEEP_HPP +#define _SIMIX_SYNCHRO_SLEEP_HPP + +#include "surf/surf.h" +#include "src/synchro/Synchro.h" + +namespace simgrid { +namespace simix { + + XBT_PUBLIC_CLASS Sleep : public Synchro { + public: + void suspend() override; + void resume() override; + void post() override; + + sg_host_t host = nullptr; /* The host that is sleeping */ + surf_action_t surf_sleep = nullptr; /* The Surf sleeping action encapsulated */ + }; + +}} // namespace simgrid::simix + +#endif