1 /* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "src/kernel/activity/SynchroRaw.hpp"
7 #include "src/surf/surf_interface.hpp"
8 #include "src/simix/smx_synchro_private.h"
10 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_synchro);
12 simgrid::kernel::activity::Raw::~Raw()
16 void simgrid::kernel::activity::Raw::suspend()
18 /* The suspension of raw synchros is delayed to when the process is rescheduled. */
21 void simgrid::kernel::activity::Raw::resume()
23 /* I cannot resume raw synchros directly. This is delayed to when the process is rescheduled at
24 * the end of the synchro. */
26 void simgrid::kernel::activity::Raw::post()
29 if (sleep->getState() == simgrid::surf::Action::State::failed)
31 else if(sleep->getState() == simgrid::surf::Action::State::done)
32 state = SIMIX_SRC_TIMEOUT;
34 SIMIX_synchro_finish(this);